adelapena commented on code in PR #2492:
URL: https://github.com/apache/cassandra/pull/2492#discussion_r1266700127
##########
src/java/org/apache/cassandra/index/Index.java:
##########
@@ -341,13 +341,21 @@ default public Callable<?> getPreJoinTask(boolean
hadBootstrap)
* Return true if this index can be built or rebuilt when the index
manager determines it is necessary. Returning
* false enables the index implementation (or some other component) to
control if and when SSTable data is
* incorporated into the index.
- *
+ * <p>
* This is called by SecondaryIndexManager in buildIndexBlocking,
buildAllIndexesBlocking and rebuildIndexesBlocking
* where a return value of false causes the index to be exluded from the
set of those which will process the
* SSTable data.
* @return if the index should be included in the set which processes
SSTable data, false otherwise.
*/
- public boolean shouldBuildBlocking();
+ boolean shouldBuildBlocking();
+
+ /**
+ * @return true if the index builds SSTable-attached on-disk components
+ */
+ default boolean isSSTableAttached()
Review Comment:
A comment would make sense. If SASI or table-based indexes had more future
that they have we could even subclass `Index` and have a generic
`SSTableAttachedIndex` API, implemented by SAI and SASI. But it probably
doesn't worth the additional complexity at this point.
##########
src/java/org/apache/cassandra/index/Index.java:
##########
@@ -341,13 +341,21 @@ default public Callable<?> getPreJoinTask(boolean
hadBootstrap)
* Return true if this index can be built or rebuilt when the index
manager determines it is necessary. Returning
* false enables the index implementation (or some other component) to
control if and when SSTable data is
* incorporated into the index.
- *
+ * <p>
* This is called by SecondaryIndexManager in buildIndexBlocking,
buildAllIndexesBlocking and rebuildIndexesBlocking
* where a return value of false causes the index to be exluded from the
set of those which will process the
* SSTable data.
* @return if the index should be included in the set which processes
SSTable data, false otherwise.
*/
- public boolean shouldBuildBlocking();
+ boolean shouldBuildBlocking();
+
+ /**
+ * @return true if the index builds SSTable-attached on-disk components
+ */
+ default boolean isSSTableAttached()
Review Comment:
A comment would make sense. If SASI or table-based indexes had more future
than they have we could even subclass `Index` and have a generic
`SSTableAttachedIndex` API, implemented by SAI and SASI. But it probably
doesn't worth the additional complexity at this point.
--
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]