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

Feature: realtime Secondary TryCatchUpWithPrimary #13065

Open
rockeet opened this issue Oct 14, 2024 · 0 comments
Open

Feature: realtime Secondary TryCatchUpWithPrimary #13065

rockeet opened this issue Oct 14, 2024 · 0 comments
Assignees

Comments

@rockeet
Copy link
Contributor

rockeet commented Oct 14, 2024

We have written a fuse file system which intentional blocks EOF read on writing files. Thus when primary instance writing WAL & manifest files, EOF read on secondary instance will be blocked, once primary instance write(or close) WAL & manifest, blocking read on secondary will get returned with the new written data at once -- our bench shown the latency is ~100us on commodity ethernet(with NFS + O_DIRECT).

With this feature, secondary instance need not sleep between TryCatchUpWithPrimary loops, but there are issues for current implementation:

  1. long lock(mutex_) in TryCatchUpWithPrimary
  2. catch up WAL depends on catch up manifest

If the long lock on mutex_ can be replace with short lock, and remove dependency then catch up WAL & manifest in 2 different threads, it should be a perfect solution.

I'm not familiar with the internal complexity of secondary instance and can not contribute a PR, I want a solution for this feature.

Another question: PurgeObsoleteFiles may not needed in TryCatchUpWithPrimary, because files are shared with primary, it should be purged by primary(with a retention period).

@rockeet rockeet changed the title DBImplSecondary::TryCatchUpWithPrimary() Questions Feature:Secondary TryCatchUpWithPrimary In realtime Oct 14, 2024
@rockeet rockeet changed the title Feature:Secondary TryCatchUpWithPrimary In realtime Feature: realtime Secondary TryCatchUpWithPrimary Oct 14, 2024
@jowlyzhang jowlyzhang self-assigned this Nov 4, 2024
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

No branches or pull requests

2 participants