Skip to content

Release node name on graceful shutdown #9734

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

Closed
CyberROFL opened this issue Sep 24, 2024 · 4 comments · Fixed by #10367
Closed

Release node name on graceful shutdown #9734

CyberROFL opened this issue Sep 24, 2024 · 4 comments · Fixed by #10367
Assignees
Labels
area/core YDB Core issues good first issue Good for newcomers improvement

Comments

@CyberROFL
Copy link
Member

CyberROFL commented Sep 24, 2024

Node should release its custom name (if used) on graceful shutdown, allowing it to be used immediately for another node.

@CyberROFL CyberROFL added good first issue Good for newcomers area/core YDB Core issues improvement labels Sep 24, 2024
@NeimadTL
Copy link
Contributor

@CyberROFL , @pixcc, it seems like the name release should be done here correct ? If so, is it as easy as setting the node's name attribute to null or are there any consideration to take into account ? Also, where is the node object defined please ?

@pixcc
Copy link
Member

pixcc commented Nov 20, 2024

@NeimadTL

In fact, there's already a pull-request here, with almost all the necessary changes. But its author hasn't made any updates for quite a long time. I'll try to ask him if he's still interested in it.

it seems like the name release should be done here correct ?

Almost, this is the process of releasing the name if the node is re-registered as serving different database. In this context subdomain, tenant and database are synonyms. The node name is formed from the prefix slot- and the sequence number of the node within the database (this number is called SlotIndex in this code). So if a node has started serving another database, it must release the slot index it occupied within the previous database, and acquire the slot index within the new database.

You can read more about this feature in docs.

If so, is it as easy as setting the node's name attribute to null or are there any consideration to take into account ?

It's actually a little more complicated than just setting the name attribute to null. It requires a new message that the compute node is going to send to the Node Broker during its graceful shutdown to release the node name. Upon receiving this message, the Node Broker will release the node name in the in-memory data structures (SlotIndexPools) and in the persistent local database. These changes will also require a feature flag, there are examples in code.

Also, where is the node object defined please ?

It is defined here.

@pixcc pixcc linked a pull request Nov 20, 2024 that will close this issue
@pixcc pixcc assigned stanislav-shchetinin and unassigned pixcc Nov 20, 2024
@pixcc
Copy link
Member

pixcc commented Nov 20, 2024

@NeimadTL

I reached the author of the pull request. He said he's interested in finishing this pull-request, there's really not much left, he's almost done.

But there are many other issues that are suitable for newcomers as well. I can help you find a task that interests you in the field of the Node Broker or database backups.

@NeimadTL
Copy link
Contributor

NeimadTL commented Nov 21, 2024

Hey @pixcc, thank you so much for the information you've provided, I've got some reading to do !

Thanks for sharing the PR already made for this. It's nice to have it so that can (try to) understand it.

Regarding the other issues to work on, how about this one ? Otherwise feel free to mention me and/or assign me on one you feel that fits best. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core YDB Core issues good first issue Good for newcomers improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants