You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove synchronized blocks from FDBDirectoryWrapper (#3494)
ForkJoinPool doesn't play well with `synchronized` blocks, particularly,
it can result in thread starvation / deadlocks. Threads waiting on
`synchronized` blocks, still count as active, and thus count towards the
parallelism of the pool.
The tests here run in a very small pool, to make sure that this won't
happen, but in actual production workloads, one would expect a much
larger pool, but also a lot more concurrent activity.
These tests were failing pretty reliably before with a pool size of 3,
and now they seem to pass reliably.
One change in here that may be surprising is the change around the
`writerReader`. I looked at the usages, and there were two:
1. Cursors would call `getReader` which would always flush, and thus
never use the field
2. `LuceneIndexMaintainer.deleteDocument` would never flush
So it makes sense to have these be two independent calls, which allows
`getWriterReader` to use a `LazyCloseable`.
Resolves: #2989Resolves: #3146
Copy file name to clipboardExpand all lines: fdb-record-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/LuceneIndexScrubbingToolsMissing.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -198,7 +198,7 @@ private boolean isMissingIndexKey(FDBIndexableRecord<Message> rec, Integer parti
Copy file name to clipboardExpand all lines: fdb-record-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/directory/FDBDirectoryManager.java
+9-12Lines changed: 9 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -84,22 +84,18 @@ public class FDBDirectoryManager implements AutoCloseable {
0 commit comments