Alias writeTime and ttl on SELECT/caching. Shorten UOW log to avoid leaking information.

This commit is contained in:
Greg Burd 2017-09-20 10:48:47 -04:00
parent 67dbb36194
commit ac7db5f243
3 changed files with 4 additions and 4 deletions

View file

@ -78,7 +78,7 @@ public abstract class AbstractOptionalOperation<E, O extends AbstractOptionalOpe
if (cachedResult != null) {
//TODO(gburd): what about select ResultSet, Tuple... etc.?
uowCacheHits.mark();
logger.info("UOW({}) cache hit, {} -> {}", uow.hashCode(), key, cachedResult.toString());
logger.info("UOW({}) cache hit, {}", uow.hashCode(), key);
result = cachedResult.stream().findFirst();
} else {
uowCacheMiss.mark();

View file

@ -83,7 +83,7 @@ public abstract class AbstractStreamOperation<E, O extends AbstractStreamOperati
if (cachedResult != null) {
//TODO(gburd): what about select ResultSet, Tuple... etc.?
uowCacheHits.mark();
logger.info("UOW({}) cache hit, {} -> {}", uow.hashCode(), key, cachedResult.toString());
logger.info("UOW({}) cache hit, {}", uow.hashCode());
result = cachedResult.stream();
} else {
uowCacheMiss.mark();

View file

@ -241,8 +241,8 @@ public final class SelectOperation<E> extends AbstractFilterStreamOperation<E, S
columnName = Iterables.getLast(prop).getColumnName().toCql(true);
}
if (!prop.getProperty().getDataType().isCollectionType()) {
selection.writeTime(columnName);
selection.ttl(columnName);
selection.writeTime(columnName).as(columnName + "_writeTime");
selection.ttl(columnName).as(columnName + "_ttl");
}
}
break;