Skip to content

fix(core): fix intermittent backup failures on Windows caused by file access problems#6748

Merged
bluestreak01 merged 9 commits intomasterfrom
rd_fix_backup_windows
Feb 7, 2026
Merged

fix(core): fix intermittent backup failures on Windows caused by file access problems#6748
bluestreak01 merged 9 commits intomasterfrom
rd_fix_backup_windows

Conversation

@RaphDal
Copy link
Copy Markdown
Contributor

@RaphDal RaphDal commented Feb 5, 2026

This pull request improves the reliability of memory-mapped file handling for columns, specifically addressing issues on Windows platforms. The key change is the introduction of a fallback mechanism for mapping files on Windows, which gracefully handles transient permission errors by falling back to an anonymous memory map populated by reading the file contents directly. This ensures that file mapping works even when Windows-specific file locking or permission issues occur.

Reason for the change

We observed file mapping failures on Windows with "Access Denied" even if the file has been successfully opened earlier.

Platform-specific file mapping improvements:

  • Added a new map_file_with_fallback function in MappedColumn that, on Windows, attempts a standard memory map and falls back to an anonymous map with direct file reading if a permission error occurs. On non-Windows platforms, the original mapping logic is retained. [1] [2]

  • Updated all uses of Mmap::map in MappedColumn to use the new map_file_with_fallback function, improving robustness when mapping both data and auxiliary files. [1] [2]

ideoma and others added 5 commits February 2, 2026 15:14
…lure

When QuestDB fails to start due to configuration errors (e.g., invalid
cron expression), there's a race condition where hello.txt is created
briefly then deleted by JVM's deleteOnExit hook. This caused confusing
error messages from cat/rm trying to access the removed file.

Redirect stderr to /dev/null for cat and rm commands to suppress these
cosmetic errors. The actual startup failure is logged elsewhere.

Also quote $HELLO_FILE for robustness with paths containing spaces.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rd_fix_backup_windows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RaphDal RaphDal changed the title fix(core): add fallback when file mmap fails on Windows fix(core): fixes intermittent backup failures on Windows caused by file reading failures Feb 5, 2026
@RaphDal RaphDal changed the title fix(core): fixes intermittent backup failures on Windows caused by file reading failures fix(core): fixes intermittent backup failures on Windows caused by file access problems Feb 5, 2026
@RaphDal RaphDal changed the title fix(core): fixes intermittent backup failures on Windows caused by file access problems fix(core): fix intermittent backup failures on Windows caused by file access problems Feb 5, 2026
bluestreak01
bluestreak01 previously approved these changes Feb 7, 2026
@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😞 fail : 0 / 3 (00.00%)

file detail

path covered line new line coverage
🔵 qdb-core/src/col_driver/mapped.rs 0 3 00.00%

@bluestreak01 bluestreak01 merged commit 2e5acf1 into master Feb 7, 2026
45 of 46 checks passed
@bluestreak01 bluestreak01 deleted the rd_fix_backup_windows branch February 7, 2026 23:22
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.

4 participants