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

[1.x] Make AbstractWorkRegistry respect the current worker of a node #1433

Merged
merged 19 commits into from
Dec 15, 2021

Conversation

yevhenii-nadtochii
Copy link
Contributor

@yevhenii-nadtochii yevhenii-nadtochii commented Dec 13, 2021

Previously, ShardSessionRecord used NodeId to indicate who is currently processing which shard.

On an application node, several workers (threads) can be used to deliver messages. Thus, their identifiers should be used in registry to clearly say who is processing the shard.

This PR updates AbstractWorkRegistry to request the current node's WorkerId to use it in ShardSessionRecord. WorkerId stores information about the node it belongs and an a worker identifier itself (typically, a thread ID).

The library version is bumped to 1.7.7-SNAPSHOT.8.

@yevhenii-nadtochii yevhenii-nadtochii self-assigned this Dec 13, 2021
@yevhenii-nadtochii yevhenii-nadtochii changed the title Make ShardedWorkRegistry use WorkerId instead of NodeId Make ShardedWorkRegistry use WorkerId Dec 13, 2021
@codecov
Copy link

codecov bot commented Dec 14, 2021

Codecov Report

Merging #1433 (14e49be) into 1.x-dev (aacba13) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##             1.x-dev    #1433      +/-   ##
=============================================
+ Coverage      90.99%   91.00%   +0.01%     
- Complexity      4813     4814       +1     
=============================================
  Files            616      616              
  Lines          15294    15302       +8     
  Branches         864      864              
=============================================
+ Hits           13917    13926       +9     
+ Misses          1105     1104       -1     
  Partials         272      272              

@yevhenii-nadtochii yevhenii-nadtochii marked this pull request as ready for review December 14, 2021 16:04
@yevhenii-nadtochii yevhenii-nadtochii marked this pull request as draft December 14, 2021 16:27
@yevhenii-nadtochii yevhenii-nadtochii changed the title Make ShardedWorkRegistry use WorkerId Make AbstractWorkRegistry respect the current worker of the node Dec 14, 2021
@yevhenii-nadtochii yevhenii-nadtochii changed the title Make AbstractWorkRegistry respect the current worker of the node Make AbstractWorkRegistry respect the current worker of a node Dec 14, 2021
@yevhenii-nadtochii yevhenii-nadtochii marked this pull request as ready for review December 14, 2021 17:38
Copy link
Contributor

@armiol armiol left a comment

Choose a reason for hiding this comment

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

@yevhenii-nadtochii LGTM with some things to fix according to the written comments and vocal discussion.

@yevhenii-nadtochii yevhenii-nadtochii changed the title Make AbstractWorkRegistry respect the current worker of a node [1.x] Make AbstractWorkRegistry respect the current worker of a node Dec 15, 2021
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.

3 participants