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] tskv file system do not use append flag; call WalWriter::close() when a writer roll to old #1637

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

zipper-meng
Copy link
Member

@zipper-meng zipper-meng commented Oct 23, 2023

Required checklist

  • Sample config files updated (config,meta/config and default config)
  • If there are user-facing changes, the documentation needs to be updated prior to approving the PR( Link )
  • If there are any breaking changes to public APIs, please add the api change label.
  • Signed CLA (if not already signed)

Which issue does this PR close?

Related #.

Rationale for this change

  1. file_manager::open_create_file() now don't use append mode, because on Windows11 we can't call file.set_len() on a file which opened with append mode.
  2. Now there can be multi opened but finished WAL files in WalManager do not have footer, to fix that, split WalWriter::write_footer() from WalWriter::close(), call wirte_footer() when a WAL file is finished.

Are there any user-facing changes?

@zipper-meng zipper-meng changed the title [Fix] Fix errors and adapts windows for tskv record file [Fix] Fix errors and adapts windows for tskv file system; split write_footer() from WalWriter::close() Oct 24, 2023
@zipper-meng zipper-meng changed the title [Fix] Fix errors and adapts windows for tskv file system; split write_footer() from WalWriter::close() [Fix] tskv file system do not use append flag; split write_footer() from WalWriter::close() Oct 24, 2023
@zipper-meng
Copy link
Member Author

zipper-meng commented Oct 24, 2023

Still need some improves:

  1. WalWriter needs to be closed when it's old, only write_footer() is not enough, so do not split method write_footer(), and call close() is right.
  2. File handle shared with WalReader must not be closed when WalWriter to be closed.

…e; 2.wal: fix some unexpected behaviour unit tests
@zipper-meng zipper-meng changed the title [Fix] tskv file system do not use append flag; split write_footer() from WalWriter::close() [Fix] tskv file system do not use append flag; call WalWriter::close() when a writer roll to old Oct 24, 2023
@roseboy-liu roseboy-liu merged commit d2d6038 into main Nov 3, 2023
7 checks passed
@roseboy-liu roseboy-liu deleted the fix/tskv_file branch November 3, 2023 06:41
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