-
Notifications
You must be signed in to change notification settings - Fork 525
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
feat(meta): add lease for meta and remove check_exists in hummock #2951
Conversation
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
META_CF_NAME.to_owned(), | ||
META_LEADER_KEY.as_bytes().to_vec(), | ||
info.encode_to_vec(), | ||
); | ||
meta_store.txn(trx).await.map_err(Into::into) |
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.
What if context_id becomes invalid just before meta_store.txn
?
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.
Good catch.... It seems that I need a memory lock for context_id
, does it?
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.
Good catch.... It seems that I need a memory lock for
context_id
, does it?
Yeah something prevents ClusterManager
from delete_worker_node
.
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
LGTM. |
@@ -65,7 +67,10 @@ enum Backend { | |||
pub struct MetaNodeOpts { | |||
// TODO: rename to listen_address and separate out the port. | |||
#[clap(long, default_value = "127.0.0.1:5690")] | |||
host: String, | |||
listen_addr: String, |
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.
Plz support the opt change in risedev as also. https://github.com/singularity-data/risingwave/blob/ce23e4a099867e10f2426eefc00d7475175b1e33/src/risedevtool/src/task/meta_node_service.rs#L45
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.
ok.
LGTM. |
I talked about lease and context id with @zwang28 . |
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #2951 +/- ##
==========================================
- Coverage 73.57% 73.48% -0.10%
==========================================
Files 744 744
Lines 102191 102397 +206
==========================================
+ Hits 75192 75245 +53
- Misses 26999 27152 +153
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
This PR breaks the usage of |
Signed-off-by: Little-Wallace bupt2013211450@gmail.com
What's changed and what's your intention?
close #2515
In this PR, we only need to check whether the leader info changed when meta-service may reload after panic, or be partitioned with etcd.
If some other node became new meta-node, it will changed leader info and all transaction submitted by the origin meta-node will fail.
Checklist
./risedev check
(or alias,./risedev c
)Refer to a related PR or issue link (optional)