-
Notifications
You must be signed in to change notification settings - Fork 214
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
[server/kv]fix bug for deleting remote kv dir #245
base: main
Are you sure you want to change the base?
Conversation
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.
Please add unit tests or IT cases to verify the fixing. An ideal place to add IT cases is KvSnapshotITCase
.
fluss-server/src/main/java/com/alibaba/fluss/server/kv/KvManager.java
Outdated
Show resolved
Hide resolved
fluss-server/src/main/java/com/alibaba/fluss/server/kv/KvManager.java
Outdated
Show resolved
Hide resolved
KvTablet dropKvTablet = | ||
inLock(tabletCreationOrDeletionLock, () -> currentKvs.remove(tableBucket)); | ||
|
||
if (dropKvTablet != null) { | ||
TablePath tablePath = dropKvTablet.getTablePath(); | ||
try { | ||
dropKvTablet.drop(); | ||
if (deleteRemote) { | ||
dropRemoteKvSnapshot(physicalTablePath, tableBucket); |
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.
This removal is very similar to remote log removal. We can move this invoking KvManager.dropRemoteKvSnapshot
into ReplicaManager#stopReplica
after remoteLogManager.stopReplica
. Ideally, we should delete the remote files (log&kv) asynchronously to not block the worker thread. We can refactor them in the near future.
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.
Yes,i have notice that,I find RemoteLogManager to manager remote files of LogTable without RemoteKvManager to manager snapshot files of KvTable,is there any plan to unify those for managering remote files? I will continue to pay attention about it and look forward to participating it.
Thank you for your guidance,I will add it. |
@wuchong PTAL,thinks |
Purpose
Linked issue: close #121
this pr is aims to solve the bug mentioned in #121
Tests
API and Format
Documentation