-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-9156] Add lock provider heartbeat manager #12958
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
Conversation
| } | ||
|
|
||
| if (this.hasActiveHeartbeat()) { | ||
| logger.warn("Owner {}: Heartbeat is already running.", ownerId); |
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.
Looks like this HeartbeatManager is hold by a client, and the conflict resolution is taken care by the server(heartbeat recipient).
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 quite sure I understand what you are asking:
- heartbeat manager runs on a thread in same jvm as lock manager/writer client
- this allows us to abstract away maintaining the lock from the lock provider.
- from the perspective of lock provider, all it does is call
heartbeatManager.startHeartbeatForThread(Thread.currentThread())
I will update the PR description with these details.
danny0405
left a comment
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.
The API looks good to me.
(cherry picked from commit 802f5ae)
(cherry picked from commit 802f5ae)
(cherry picked from commit 802f5ae)
(cherry picked from commit 802f5ae)
(cherry picked from commit 802f5ae)
Change Logs
Adds a heartbeat manager for the lock provider with conditional writes.
See RFC: #12927
Impact
This heartbeat manager is responsible for maintaining a thread which constantly updates the lock file in storage.
The heartbeat manager runs on a thread in same jvm as lock manager/writer client. This allows us to abstract away maintaining the lock from the lock provider. From the perspective of lock provider, all it does is call
heartbeatManager.startHeartbeatForThread(Thread.currentThread()).Risk level (write none, low medium or high below)
None
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".
None
Contributor's checklist