maedhroz commented on code in PR #3122:
URL: https://github.com/apache/cassandra/pull/3122#discussion_r1502969211
##########
src/java/org/apache/cassandra/index/sai/plan/StorageAttachedIndexSearcher.java:
##########
@@ -370,13 +372,20 @@ private UnfilteredRowIterator
queryStorageAndFilter(PrimaryKey key)
return null;
lastKey = key;
+ long startTimeNanos = Clock.Global.nanoTime();
try (UnfilteredRowIterator partition =
queryController.queryStorage(key, executionController))
{
queryContext.partitionsRead++;
queryContext.checkpoint();
- return applyIndexFilter(key, partition, filterTree,
queryContext);
+ UnfilteredRowIterator filtered = applyIndexFilter(key,
partition, filterTree, queryContext);
+
+ // Note that we record the duration of the read after
post-filtering, which actually
+ // materializes the rows from disk.
+
queryController.tableQueryMetrics.postFilteringReadLatency.update(Clock.Global.nanoTime()
- startTimeNanos, TimeUnit.NANOSECONDS);
Review Comment:
I went back and forth on this a little bit. Especially since I'd like to
batch row reads into the same partition read sooner rather than later, and even
when we read single rows, we're issuing a partition read, it felt unnecessary
to qualify the already long name even further. WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]