-
Notifications
You must be signed in to change notification settings - Fork 14
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
[DPE-5371]: Storage reuse on a different cluster #488
base: 6/edge
Are you sure you want to change the base?
Conversation
09ec58a
to
10a97e0
Compare
Features: * Storage reuse on the same cluster (scale down, scale to zero) * Storage reuse on a different cluster with same app name * Storage reuse on a different cluster with different app name
10a97e0
to
b1c47a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work Neha.
You have added a huge value to our project! Left some questions, requested changes, and nits
def drop_local_database(self): | ||
"""DANGEROUS: Drops the local database.""" | ||
self.client.drop_database("local") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there something we can calculate / store in app databag to verify whether it is safe to drop the local db? then we could add a guardrail by raising a custom exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure.
TBH dropping the local database is not really something that should be done, but it does work.
The big issue behind dropping the local DB is that it stores also the oplog.
I can try to drop less information than that in this call in order to be safer but I'm unsure it will work.
Should I give it a try?
assert sorted(storage_ids.values()) == sorted(new_storage_ids), "Storage IDs mismatch" | ||
|
||
actual_writes = await count_writes(ops_test, app_name=new_app_name) | ||
assert writes_results["number"] == actual_writes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same checks as suggested above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you have suggested a check above, maybe a comment got lost?
Issue
Solution
There are multiple problems to face when reusing storage in a new application:
The solution chosen here is the following:
install
event, which is not the case for the app peer databag)config
(not thestatus
which does requires to be connected to other nodes).The (not so big) drawback:
Implements
Suggestions for the future
Having a DNS in the cluster would help as network crash or machines restarting wouldn't change the name of each unit, and the cluster would be able to survive IP changes.