Skip to content

Conversation

@kevinrr888
Copy link
Member

@kevinrr888 kevinrr888 commented Jun 20, 2025

Avoids creating multiple conditional writers for UserFateStore.

  • FateStore now extends AutoCloseable
    • MetaFateStore.close() is no-op
    • UserFateStore.close() closes the conditional writer
    • All tests using a FateStore now call close()
    • The real fate stores are closed on the shutdown of fate
  • UserFateStore now only creates a single conditional writer
    • Num threads for this conditional writer set by a new prop CONDITIONAL_WRITER_THREADS_MAX_FATE_TABLE
    • writer in UserFateStore is a memoized Supplier so it's not created when using a ReadOnlyFateStore.

Diff is much larger than actual changes, much of the changes are from needing to put the fate stores in a try-with-resources.
Verified sunny passes and all FATE tests pass

closes #5660

Avoids creating multiple conditional writers for UserFateStore.

* FateStore now extends AutoCloseable
	* MetaFateStore.close() falls back to AbstractFateStores impl of close() which is no-op
	* UserFateStore.close() closes the conditional writer
	* All tests using a FateStore now call close()
	* The real fate stores are closed on the shutdown of fate
* UserFateStore now only creates a single conditional writer
	* Num threads for this conditional writer set by a new prop CONDITIONAL_WRITER_THREADS_MAX_FATE_TABLE
	* writer in UserFateStore is a memoized Supplier so it's not created when using a ReadOnlyFateStore.

closes apache#5660
@kevinrr888 kevinrr888 added this to the 4.0.0 milestone Jun 20, 2025
@kevinrr888 kevinrr888 self-assigned this Jun 20, 2025
was using try-with-resources on a ReadOnlyFateStore in one place. Reverted the added
try-with-resources
@kevinrr888 kevinrr888 merged commit bfaa80f into apache:main Jun 24, 2025
10 of 11 checks passed
@kevinrr888 kevinrr888 deleted the 4.0-feature-5660 branch June 24, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid creating a conditional writer per compaction commit

2 participants