FoundationDB / fdb-record-layer

A record-oriented store built on FoundationDB
Apache License 2.0
570 stars 102 forks source link

Resolves #2787: Index scrubber could enforce early transaction commit #2788

Closed alecgrieser closed 2 weeks ago

alecgrieser commented 2 weeks ago

The main substantive change here is that the OnlineIndexScrubber.Builder now allows the user to set a time limit and a transaction time limit. This is then honored by logic in IndexinbBase: https://github.com/FoundationDB/fdb-record-layer/blob/695c4053527faf59bcb604abd3fd7bf57fddb11f/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/IndexingBase.java#L935-L944

This should result in operations committing early rather than hitting transaction_too_old exceptions.

This also refactors the way that configuration is specified for the online indexer and online index scrubber so that they share a base-builder implementation. That base builder contains the de-duplicated code. In theory, we could have done this by updating the OnlineIndexScrubber.Builder with two new methods setting the time limits, but this seemed like a good change to make to avoid having as much config drift in the future.

This resolves #2787.

foundationdb-ci commented 2 weeks ago

Result of fdb-record-layer-pr on Linux CentOS 7

foundationdb-ci commented 2 weeks ago

Result of fdb-record-layer-pr on Linux CentOS 7

foundationdb-ci commented 2 weeks ago

Result of fdb-record-layer-pr on Linux CentOS 7

foundationdb-ci commented 2 weeks ago

Result of fdb-record-layer-pr on Linux CentOS 7