Skip to content

Commit 80e60b7

Browse files
committed
Merge remote-tracking branch 'upstream/main' into full_support_for_uuid
2 parents b33f0fd + 72ccc88 commit 80e60b7

File tree

444 files changed

+2206
-912
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+2206
-912
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Upload Coverage to Teamscale
2+
3+
permissions:
4+
actions: read
5+
6+
on:
7+
workflow_run:
8+
workflows: [Pull Request]
9+
types:
10+
- completed
11+
12+
jobs:
13+
upload_coverage:
14+
runs-on: ubuntu-latest
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
16+
steps:
17+
- name: 'Download artifact'
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
run_id: context.payload.workflow_run.id,
25+
});
26+
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
27+
return artifact.name == "coverage-report"
28+
})[0];
29+
let download = await github.rest.actions.downloadArtifact({
30+
owner: context.repo.owner,
31+
repo: context.repo.repo,
32+
artifact_id: matchArtifact.id,
33+
archive_format: 'zip',
34+
});
35+
const fs = require('fs');
36+
const path = require('path');
37+
const temp = '${{ runner.temp }}/artifacts';
38+
if (!fs.existsSync(temp)){
39+
fs.mkdirSync(temp);
40+
}
41+
fs.writeFileSync(path.join(temp, 'coverage-report.zip'), Buffer.from(download.data));
42+
43+
- name: 'Unzip artifact'
44+
run: unzip "${{ runner.temp }}/artifacts/coverage-report.zip" -d "${{ runner.temp }}/artifacts"
45+
- name: 'Upload coverage'
46+
uses: 'cqse/teamscale-upload-action@8d10b6693b9242420ef2062dbefc36af6e88d587'
47+
with:
48+
server: 'https://fdb.teamscale.io'
49+
project: 'foundationdb-fdb-record-layer'
50+
user: 'fdb-record-layer-build'
51+
partition: 'CI Tests'
52+
accesskey: ${{ secrets.TEAMSCALE_ACCESS_KEY }}
53+
format: 'JACOCO'
54+
revision: ${{ github.event.workflow_run.head_sha }}
55+
files: "${{ runner.temp}}/artifacts/codeCoverageReport.xml"

docs/sphinx/source/ReleaseNotes.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,76 @@ As the [versioning guide](Versioning.md) details, it cannot always be determined
77

88
## 4.5
99

10+
### 4.5.4.0
11+
12+
<h4> New Features </h4>
13+
14+
* Interpret full-supported UUID type correctly in JDBC server - [PR #3515](https://github.com/FoundationDB/fdb-record-layer/pull/3515)
15+
<h4> Bug Fixes </h4>
16+
17+
* Fix case-sensitivity handling - [PR #3511](https://github.com/FoundationDB/fdb-record-layer/pull/3511)
18+
* Remove synchronized blocks from FDBDirectoryWrapper - [PR #3494](https://github.com/FoundationDB/fdb-record-layer/pull/3494)
19+
20+
<details>
21+
<summary>
22+
23+
<h4> Build/Test/Documentation/Style Improvements (click to expand) </h4>
24+
25+
</summary>
26+
27+
* Chore - Update copyright date - [PR #3528](https://github.com/FoundationDB/fdb-record-layer/pull/3528)
28+
29+
</details>
30+
31+
32+
**[Full Changelog (4.5.3.0...4.5.4.0)](https://github.com/FoundationDB/fdb-record-layer/compare/4.5.3.0...4.5.4.0)**
33+
34+
#### Mixed Mode Test Results
35+
36+
Mixed mode testing run against the following previous versions:
37+
38+
`4.4.8.0`, ❌`4.4.9.0`, ❌`4.4.10.0`, ❌`4.4.11.0`, ✅`4.4.12.0`, ✅`4.4.14.0`, ✅`4.4.15.0`, ✅`4.5.1.0`, ✅`4.5.2.0`, ✅`4.5.3.0`
39+
40+
[See full test run](https://github.com/FoundationDB/fdb-record-layer/actions/runs/16753916516)
41+
42+
43+
44+
### 4.5.3.0
45+
46+
47+
48+
**[Full Changelog (4.5.2.0...4.5.3.0)](https://github.com/FoundationDB/fdb-record-layer/compare/4.5.2.0...4.5.3.0)**
49+
50+
#### Mixed Mode Test Results
51+
52+
Mixed mode testing run against the following previous versions:
53+
54+
`4.4.7.0`, ❌`4.4.8.0`, ❌`4.4.9.0`, ❌`4.4.10.0`, ❌`4.4.11.0`, ✅`4.4.12.0`, ✅`4.4.14.0`, ✅`4.4.15.0`, ✅`4.5.1.0`, ✅`4.5.2.0`
55+
56+
[See full test run](https://github.com/FoundationDB/fdb-record-layer/actions/runs/16629945151)
57+
58+
59+
60+
### 4.5.2.0
61+
62+
<h4> Bug Fixes </h4>
63+
64+
* Fix some software rot in the sqlline CLI - [PR #3502](https://github.com/FoundationDB/fdb-record-layer/pull/3502)
65+
* `NULL` handling fixes in plan generator - [PR #3506](https://github.com/FoundationDB/fdb-record-layer/pull/3506)
66+
67+
68+
**[Full Changelog (4.5.1.0...4.5.2.0)](https://github.com/FoundationDB/fdb-record-layer/compare/4.5.1.0...4.5.2.0)**
69+
70+
#### Mixed Mode Test Results
71+
72+
Mixed mode testing run against the following previous versions:
73+
74+
`4.4.4.0`, ❌`4.4.7.0`, ❌`4.4.8.0`, ❌`4.4.9.0`, ❌`4.4.10.0`, ❌`4.4.11.0`, ✅`4.4.12.0`, ✅`4.4.14.0`, ✅`4.4.15.0`, ✅`4.5.1.0`
75+
76+
[See full test run](https://github.com/FoundationDB/fdb-record-layer/actions/runs/16627768059)
77+
78+
79+
1080
### 4.5.1.0
1181

1282
<h4> Breaking Changes </h4>

fdb-record-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexMaintainer.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ int deleteDocument(Tuple groupingKey, Integer partitionId, Tuple primaryKey) thr
299299
@Nullable final LucenePrimaryKeySegmentIndex segmentIndex = directoryManager.getDirectory(groupingKey, partitionId).getPrimaryKeySegmentIndex();
300300

301301
if (segmentIndex != null) {
302-
final DirectoryReader directoryReader = directoryManager.getDirectoryReader(groupingKey, partitionId);
302+
final DirectoryReader directoryReader = directoryManager.getWriterReader(groupingKey, partitionId);
303303
final LucenePrimaryKeySegmentIndex.DocumentIndexEntry documentIndexEntry = segmentIndex.findDocument(directoryReader, primaryKey);
304304
if (documentIndexEntry != null) {
305305
state.context.ensureActive().clear(documentIndexEntry.entryKey); // TODO: Only if valid?
@@ -702,14 +702,15 @@ private CompletableFuture<IndexOperationResult> getLuceneInfoForAllPartitions(fi
702702
@SuppressWarnings("PMD.CloseResource") // the indexReader and directory are closed by the directoryManager
703703
private CompletableFuture<LuceneMetadataInfo.LuceneInfo> getLuceneInfo(final Tuple groupingKey, final Integer partitionId) {
704704
try {
705-
final IndexReader indexReader = directoryManager.getIndexReader(groupingKey, partitionId);
706-
final FDBDirectory directory = getDirectory(groupingKey, partitionId);
707-
final CompletableFuture<Integer> fieldInfosFuture = directory.getFieldInfosCount();
708-
return directory.listAllAsync()
709-
.thenCombine(fieldInfosFuture, (fileList, fieldInfosCount) ->
710-
new LuceneMetadataInfo.LuceneInfo(
711-
indexReader.numDocs(),
712-
fileList, fieldInfosCount));
705+
try (IndexReader indexReader = directoryManager.getIndexReader(groupingKey, partitionId)) {
706+
final FDBDirectory directory = getDirectory(groupingKey, partitionId);
707+
final CompletableFuture<Integer> fieldInfosFuture = directory.getFieldInfosCount();
708+
return directory.listAllAsync()
709+
.thenCombine(fieldInfosFuture, (fileList, fieldInfosCount) ->
710+
new LuceneMetadataInfo.LuceneInfo(
711+
indexReader.numDocs(),
712+
fileList, fieldInfosCount));
713+
}
713714
} catch (IOException e) {
714715
return CompletableFuture.failedFuture(e);
715716
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ private boolean isMissingIndexKey(FDBIndexableRecord<Message> rec, Integer parti
198198
throw LuceneExceptions.toRecordCoreException("failed getIndexWriter", e);
199199
}
200200
try {
201-
DirectoryReader directoryReader = directoryManager.getDirectoryReader(groupingKey, partitionId);
201+
DirectoryReader directoryReader = directoryManager.getWriterReader(groupingKey, partitionId);
202202
final LucenePrimaryKeySegmentIndex.DocumentIndexEntry documentIndexEntry = segmentIndex.findDocument(directoryReader, rec.getPrimaryKey());
203203
if (documentIndexEntry == null) {
204204
// Here: the document had not been found in the PK segment index

fdb-record-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/directory/FDBDirectoryManager.java

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,18 @@ public class FDBDirectoryManager implements AutoCloseable {
8484
@Nonnull
8585
private final Map<Tuple, FDBDirectoryWrapper> createdDirectories;
8686
private final int mergeDirectoryCount;
87-
@Nullable
88-
private final Exception exceptionAtCreation;
8987
@Nonnull
9088
protected final LuceneAnalyzerWrapper writerAnalyzer;
9189
@Nonnull
9290
private final LuceneAnalyzerCombinationProvider analyzerSelector;
91+
@Nullable
92+
protected final Exception exceptionAtCreation;
9393

9494
protected FDBDirectoryManager(@Nonnull IndexMaintainerState state) {
9595
this.state = state;
9696
this.createdDirectories = new ConcurrentHashMap<>();
9797
this.mergeDirectoryCount = getMergeDirectoryCount(state);
98-
if (FDBTieredMergePolicy.usesCreationStack()) {
99-
this.exceptionAtCreation = new Exception();
100-
} else {
101-
this.exceptionAtCreation = null;
102-
}
98+
this.exceptionAtCreation = FDBTieredMergePolicy.usesCreationStack() ? new Exception() : null;
10399
final var fieldInfos = LuceneIndexExpressions.getDocumentFieldDerivations(state.index, state.store.getRecordMetaData());
104100
this.analyzerSelector = LuceneAnalyzerRegistryImpl.instance().getLuceneAnalyzerCombinationProvider(state.index, LuceneAnalyzerType.FULL_TEXT, fieldInfos);
105101
this.writerAnalyzer = analyzerSelector.provideIndexAnalyzer();
@@ -206,7 +202,7 @@ public void mergeIndexWithContext(@Nonnull final Tuple groupingKey,
206202
@Nonnull final AgilityContext agilityContext) {
207203
try (FDBDirectoryWrapper directoryWrapper = createDirectoryWrapper(groupingKey, partitionId, agilityContext)) {
208204
try {
209-
directoryWrapper.mergeIndex(exceptionAtCreation);
205+
directoryWrapper.mergeIndex();
210206
if (LOGGER.isDebugEnabled()) {
211207
LOGGER.debug(KeyValueLogMessage.of("Lucene merge success",
212208
LuceneLogMessageKeys.GROUP, groupingKey,
@@ -312,7 +308,8 @@ private FDBDirectoryWrapper createDirectoryWrapper(@Nullable Tuple groupingKey,
312308
}
313309

314310
protected @Nonnull FDBDirectoryWrapper createNewDirectoryWrapper(final IndexMaintainerState state, final Tuple key, final int mergeDirectoryCount, final AgilityContext agilityContext, final int blockCacheMaximumSize) {
315-
return new FDBDirectoryWrapper(state, key, mergeDirectoryCount, agilityContext, blockCacheMaximumSize, writerAnalyzer);
311+
return new FDBDirectoryWrapper(state, key, mergeDirectoryCount, agilityContext, blockCacheMaximumSize,
312+
writerAnalyzer, exceptionAtCreation);
316313
}
317314

318315
private int getBlockCacheMaximumSize() {
@@ -367,11 +364,11 @@ public IndexReader getIndexReader(@Nullable Tuple groupingKey, @Nullable Integer
367364

368365
@Nonnull
369366
public IndexWriter getIndexWriter(@Nullable Tuple groupingKey, @Nullable Integer partitionId) throws IOException {
370-
return getDirectoryWrapper(groupingKey, partitionId).getWriter(exceptionAtCreation);
367+
return getDirectoryWrapper(groupingKey, partitionId).getWriter();
371368
}
372369

373-
public DirectoryReader getDirectoryReader(@Nullable Tuple groupingKey, @Nullable Integer partititonId) throws IOException {
374-
return getDirectoryWrapper(groupingKey, partititonId).getWriterReader(false);
370+
public DirectoryReader getWriterReader(@Nullable Tuple groupingKey, @Nullable Integer partititonId) throws IOException {
371+
return getDirectoryWrapper(groupingKey, partititonId).getWriterReader();
375372
}
376373

377374
@Nonnull

0 commit comments

Comments
 (0)