Skip to content

Commit 4f275e8

Browse files
committed
Apply Scott's requested changes
1 parent 49f3739 commit 4f275e8

File tree

2 files changed

+6
-33
lines changed

2 files changed

+6
-33
lines changed

docs/ReleaseNotes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Builds and releases have been moved to a new CI system. This includes the resump
1515

1616
Users performing online updates are encouraged to update from [4.0.559.4](#405594). The continuations of some queries have changed in ways that may break if continued on other 4.0 builds. See: [Issue #3093](https://github.com/FoundationDB/fdb-record-layer/issues/3093), [PR #3092](https://github.com/FoundationDB/fdb-record-layer/pull/3092) fixing the issue, and [PR #3108](https://github.com/FoundationDB/fdb-record-layer/issues/3108) preparing 4.0.559.4 to accept newer continuations.
1717

18-
< !--
18+
<!--
1919
// begin next release
2020
### NEXT_RELEASE
2121
@@ -33,7 +33,7 @@ Users performing online updates are encouraged to update from [4.0.559.4](#40559
3333
* **Feature** Feature 2 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
3434
* **Feature** Feature 3 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
3535
* **Feature** Add verifications to yaml-tests that assert on planner metrics regressions [(Issue #3113)](https://github.com/FoundationDB/fdb-record-layer/issues/3113)
36-
* **Feature** Support Lucene index scrubbing [(Issue #3008)](https://github.com/FoundationDB/fdb-record-layer/issues/3008)
36+
**Feature** Support Lucene index scrubbing [(Issue #3008)](https://github.com/FoundationDB/fdb-record-layer/issues/3008)
3737
* **Breaking change** Change 1 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
3838
* **Breaking change** Change 2 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
3939
* **Breaking change** Changes to supprt CTE skips and limits can result in plan hash mismatches during online upgrades [(Issue #3100)](https://github.com/FoundationDB/fdb-record-layer/issues/3100)
@@ -51,7 +51,7 @@ Several "FDB relational" sub-projects have been added which present a new relati
5151

5252
### Breaking Changes
5353

54-
The Apache Commons library has been removed as a dependency. There were a few locations where the `Pair` class from that library was exposed via the API. This has necessitated making API incompatible changes. These have mostly been replaced by classes defined in the repository, or with other JDK classes.
54+
Our API stability annotations have been updated to reflect greater API instability. We have degraded existing `STABLE` and `MAINTAINED` APIs to `UNSTABLE`, and the `MAINTAINED` classification has been removed from the project. The new relational sub-projects' APIs are all `EXPERIMENTAL` (or `INTERNAL`). These APIs are expected to evolve in the future as more functionality is moved to the relational APIs. The API annotation class was moved to its own module, to avoid having the new sub-projects depend on the FDB java bindings.
5555

5656
### 4.0.575.0
5757

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

+3-30
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ private static Stream<Arguments> threeBooleanArgs() {
7373
.map(isGrouped -> Arguments.of(isSynthetic, isGrouped, isPartitioned))));
7474
}
7575

76-
private boolean yinYang() {
77-
flipBoolean = !flipBoolean;
78-
return flipBoolean;
79-
}
80-
8176
@Nonnull
8277
protected FDBRecordStore.Builder getStoreBuilderWithRegistry(@Nonnull FDBRecordContext context,
8378
@Nonnull RecordMetaDataProvider metaData,
@@ -98,17 +93,11 @@ void luceneIndexScrubMissingDataModelNoIssues(boolean isSynthetic, boolean isGro
9893
.build();
9994

10095
for (int i = 0; i < 14; i++) {
101-
dataModel.setReverseSaveOrder(yinYang());
10296
try (final FDBRecordContext context = openContext()) {
10397
dataModel.saveRecords(7, context, i / 6);
10498
context.commit();
10599
}
106100
}
107-
try (FDBRecordContext context = openContext()) {
108-
final FDBRecordStore recordStore = dataModel.createOrOpenRecordStore(context);
109-
dataModel.sampleRecordsUnderTest().forEach(sampleRecord -> sampleRecord.deleteRecord(recordStore).join());
110-
context.commit();
111-
}
112101

113102
try (final FDBRecordContext context = openContext()) {
114103
dataModel.explicitMergeIndex(context, timer);
@@ -184,36 +173,20 @@ void luceneIndexScrubMissingDataModel(boolean isSynthetic, boolean isGrouped, bo
184173
final InjectedFailureRepository injectedFailures = new InjectedFailureRepository();
185174
registry.overrideFactory(new MockedLuceneIndexMaintainerFactory(injectedFailures));
186175

187-
for (int i = 0; i < 14; i++) {
188-
dataModel.setReverseSaveOrder(yinYang());
189-
try (final FDBRecordContext context = openContext()) {
190-
dataModel.saveRecords(7, context, i / 6);
191-
context.commit();
192-
}
193-
}
194-
195-
try (final FDBRecordContext context = openContext()) {
196-
dataModel.explicitMergeIndex(context, timer);
197-
context.commit();
198-
}
199-
200176
try (final FDBRecordContext context = openContext()) {
201177
// Write some documents
202-
dataModel.saveRecordsToAllGroups(7, context);
178+
dataModel.saveRecordsToAllGroups(17, context);
203179
context.commit();
204180
}
205181

206-
try (FDBRecordContext context = openContext()) {
207-
final FDBRecordStore recordStore = dataModel.createOrOpenRecordStore(context);
208-
dataModel.sampleRecordsUnderTest().forEach(sampleRecord -> sampleRecord.deleteRecord(recordStore).join());
209-
context.commit();
210-
}
211182
try (final FDBRecordContext context = openContext()) {
212183
dataModel.explicitMergeIndex(context, timer);
213184
context.commit();
214185
}
215186

216187
try (final FDBRecordContext context = openContext()) {
188+
// By saving records with both setReverseSaveOrder true and false, we ensure that records
189+
// are in the oldest and most-recent partitions (if there are partitions)
217190
dataModel.setReverseSaveOrder(true);
218191
dataModel.saveRecords(7, context, 1);
219192
dataModel.setReverseSaveOrder(false);

0 commit comments

Comments
 (0)