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

[NEW] Skip unnecessary AOF loading from disk on startup when a master is available #10523

Open
eduardobr opened this issue Apr 4, 2022 · 0 comments

Comments

@eduardobr
Copy link
Contributor

eduardobr commented Apr 4, 2022

The problem/use-case that the feature addresses

When a replica has appendonly yes it will first load any AOF found in disk, then connect to master and load a new dataset again.
There's no chance of PSYNC from an AOF, so the first step seems unnecessary.

Description of the feature

On startup, only load AOF from disk if we can't SYNC to master.
At least while the feature of restarting from AOF + PSYNC is not available.

Alternatives you've considered

Implement PSYNC for restarting from AOF (on both master and replica restart).

Additional information

If this is not acceptable, we could consider for the design of #9796 to have a way of knowing in advance whether a PSYNC will be possible, then skip loading AOF from disk when both are true:

  • No necessary information stored for PSYNC or dataset is too old
  • We managed to connect to master.

By that, I mean storing separately the information necessary for PSYNC, so we reduce chances of loading whole AOF unnecessarily and right after having to FULL SYNC from master.

Note: assuming that #9796 would be implemented for replicas as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant