Skip to content

Commit 938576f

Browse files
committed
Apply Scott's requested changes (Still missing - check index filter)
1 parent 63ab06b commit 938576f

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Diff for: fdb-record-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexScrubbingToolsMissing.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private CompletableFuture<Void> checkMissingIndexKey(FDBIndexableRecord<Message>
159159
}
160160
if (recordFields.size() == 1) {
161161
// A single grouping key, simple check.
162-
return checkMissingIndexKey(rec, recordFields.keySet().stream().iterator().next(), issue);
162+
return checkMissingIndexKey(rec, recordFields.keySet().iterator().next(), issue);
163163
}
164164

165165
// Here: more than one grouping key, declare an issue if at least one of them is missing

Diff for: fdb-record-layer-lucene/src/test/java/com/apple/foundationdb/record/lucene/LuceneIndexScrubbingTest.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,14 @@ void luceneIndexScrubMissingDataModel(boolean isSynthetic, boolean isGrouped, bo
185185

186186
try (final FDBRecordContext context = openContext()) {
187187
// Write some documents
188-
dataModel.saveRecords(15, 10, context, 1);
189-
// Trigger failures
188+
dataModel.saveRecords(7, 10, context, 1);
189+
dataModel.saveRecords(7, 20, context, 2);
190+
dataModel.saveRecords(7, 30, context, 3);
191+
// Write few more records without updating
190192
injectedFailures.setFlag(LUCENE_MAINTAINER_SKIP_INDEX_UPDATE);
191-
// Some overwrites (with index update failures)
192-
dataModel.saveRecords(5, 10, context, 1);
193-
// some new (with index update failures)
194-
dataModel.saveRecords(5, 50, context, 1);
193+
dataModel.saveRecords(3, 10, context, 1);
194+
dataModel.saveRecords(2, 20, context, 3);
195+
dataModel.saveRecords(5, 20, context, 4);
195196
injectedFailures.setFlag(LUCENE_MAINTAINER_SKIP_INDEX_UPDATE, false);
196197
context.commit();
197198
}

0 commit comments

Comments
 (0)