Skip to content

replicaset_mode: fix queue.tube indexes #203

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

Merged
merged 1 commit into from
Mar 7, 2023
Merged

Conversation

0x501D
Copy link
Member

@0x501D 0x501D commented Mar 6, 2023

In replicaset mode, tubes can be created and deleted on different nodes. Accordingly, it is necessary to rebuild the queue.tube index.

Close #202

@0x501D 0x501D requested review from LeonidVas and oleg-jukovec March 6, 2023 16:28
@0x501D 0x501D force-pushed the 0x501D/fix_gh_202 branch from 0347ba5 to b80e616 Compare March 6, 2023 16:54
Copy link
Contributor

@LeonidVas LeonidVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thank you for the patch.
Close # ... -> Closes #
LGTM

In replicaset mode, tubes can be created and deleted on different nodes.
Accordingly, it is necessary to rebuild the queue.tube index.

Closes #202
@0x501D 0x501D force-pushed the 0x501D/fix_gh_202 branch from b80e616 to c88fdea Compare March 7, 2023 11:49
@0x501D
Copy link
Member Author

0x501D commented Mar 7, 2023

Hi! Thank you for the patch. Close # ... -> Closes # LGTM

Fixed.

@LeonidVas LeonidVas merged commit 2f157c9 into master Mar 7, 2023
@LeonidVas LeonidVas deleted the 0x501D/fix_gh_202 branch March 7, 2023 11:52
Copy link
Contributor

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch!

Comment on lines +550 to +554
for _, tube_tuple in box.space._queue:pairs() do
if queue.driver[tube_tuple[4]] ~= nil then
recreate_tube(tube_tuple)
end
end
Copy link
Contributor

@oleg-jukovec oleg-jukovec Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could extract it in a separate function: recreate_tubes. The code appears at least two times in the file.

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

Successfully merging this pull request may close these issues.

Failure when trying to use the tube after switching back to the master
3 participants