Skip to content

Commit 0efd33b

Browse files
committed
Fixup new implementation of IndexQueryabilityFilter
1 parent 66d627a commit 0efd33b

File tree

1 file changed

+1
-12
lines changed
  • fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb

1 file changed

+1
-12
lines changed

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/FDBRecordStore.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4722,18 +4722,7 @@ protected CompletableFuture<Long> getRecordCountForRebuildIndexes(boolean newSto
47224722
@Nullable RecordType singleRecordTypeWithPrefixKey) {
47234723
// Do this with the new indexes filtered out to avoid using one of them when evaluating the snapshot record count.
47244724
// At this point we won't have written that any new indexes are disabled
4725-
final IndexQueryabilityFilter indexQueryabilityFilter = new IndexQueryabilityFilter() {
4726-
@Override
4727-
public boolean isQueryable(@Nonnull final Index index) {
4728-
return !indexes.containsKey(index);
4729-
}
4730-
4731-
@Override
4732-
public int queryHash(@Nonnull final QueryHashKind hashKind) {
4733-
// the query is not preserved in any way, so prevent usage of the hash
4734-
throw new RecordCoreException("queryHash for getRecordCountForRebuildIndexes should not be used");
4735-
}
4736-
};
4725+
final IndexQueryabilityFilter indexQueryabilityFilter = index -> !indexes.containsKey(index);
47374726
if (singleRecordTypeWithPrefixKey != null) {
47384727
// Get a count for just those records, either from a COUNT index on just that type or from a universal COUNT index grouped by record type.
47394728
try {

0 commit comments

Comments
 (0)