Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cairo): re-read metadata in TableReader for consistent read #1800

Merged
merged 66 commits into from
Jan 27, 2022

Conversation

ideoma
Copy link
Collaborator

@ideoma ideoma commented Jan 18, 2022

Fixes few issue on Reader / Writer concurrent use over the table

  • TableReader will re-try reading metadata file on reload if the file is not found for few iterations
  • TableWriter will add Structure Version in _meta file which and the value will be the same an in _txn file
  • TableReader checks that Structure Version matches between _meta and _txn file and if not re-reads both
  • When TableReader reads _txn file it reads symbol count and partition size first. If then the transaction check didn't match then subsequent loads will reload of all partitions is used instead of incremental

@ideoma ideoma marked this pull request as draft January 19, 2022 08:56
@ideoma ideoma marked this pull request as ready for review January 25, 2022 01:45
ideoma and others added 24 commits January 26, 2022 14:21
…-fix

 Conflicts:
	core/src/main/resources/io/questdb/bin/armlinux/libquestdb.so
	core/src/main/resources/io/questdb/bin/armosx/libquestdb.dylib
	core/src/main/resources/io/questdb/bin/linux/libquestdb.so
	core/src/main/resources/io/questdb/bin/osx/libquestdb.dylib
	core/src/main/resources/io/questdb/bin/windows/libquestdb.dll
- speed up few tests where TableReader times out reload meta
- split ci Windows tests into 3 runs
@ideoma
Copy link
Collaborator Author

ideoma commented Jan 27, 2022

[PR Coverage check]

😍 pass : 315 / 327 (96.33%)

file detail

path covered line new line coverage
🔵 io/questdb/cairo/mig/Mig614.java 21 24 87.50%
🔵 io/questdb/cairo/TableWriterMetadata.java 17 18 94.44%
🔵 io/questdb/cairo/TableReader.java 87 92 94.57%
🔵 io/questdb/cairo/TableUtils.java 40 42 95.24%
🔵 io/questdb/cairo/TxWriter.java 32 33 96.97%
🔵 io/questdb/cairo/TableWriter.java 25 25 100.00%
🔵 io/questdb/cairo/TxReader.java 23 23 100.00%
🔵 io/questdb/cairo/TxnScoreboard.java 6 6 100.00%
🔵 io/questdb/cairo/RebuildIndex.java 1 1 100.00%
🔵 io/questdb/cairo/O3PurgeDiscoveryJob.java 41 41 100.00%
🔵 io/questdb/cairo/vm/MemoryCMRImpl.java 4 4 100.00%
🔵 io/questdb/cairo/mig/EngineMigration.java 1 1 100.00%
🔵 io/questdb/cutlass/line/tcp/LineTcpMeasurementScheduler.java 2 2 100.00%
🔵 io/questdb/cairo/TableReaderMetadata.java 15 15 100.00%

@bluestreak01 bluestreak01 merged commit cbc124f into master Jan 27, 2022
@bluestreak01 bluestreak01 deleted the metadata-dirty-read-fix branch January 27, 2022 15:42
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.

None yet

2 participants