-
Notifications
You must be signed in to change notification settings - Fork 589
HDDS-8869. Make DN DeleteBlocksCommandHandler wait for the lock can timeout. #4913
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
Changes from 1 commit
426b3cf
6a8b74e
96a8ad8
fd0105f
2b8e4ea
9fa10cb
c1ddf5d
eeb9f8e
7ede747
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,6 +192,24 @@ public class DatanodeConfiguration { | |
| private long recoveringContainerScrubInterval = | ||
| Duration.ofMinutes(10).toMillis(); | ||
|
|
||
| /** | ||
| * Timeout for the thread used to process the delete block command | ||
| * to wait for the container lock. | ||
| * It takes about 200ms to open a RocksDB with HDD media. | ||
| * Set the default value to 100ms, so that after one times retry | ||
| * after waiting timeout, the hold time spent waiting for the lock | ||
| * is not greater than the time spent operating RocksDB | ||
| */ | ||
| @Config(key = "block.delete.command.handle.lock.timeout", | ||
|
||
| defaultValue = "100ms", | ||
| type = ConfigType.TIME, | ||
| tags = { DATANODE, ConfigTag.DELETION}, | ||
| description = "Timeout for the thread used to process the delete" + | ||
| " block command to wait for the container lock." | ||
| ) | ||
| private long blockDeleteCommandHandleLockTimeoutMs = | ||
| Duration.ofMillis(100).toMillis(); | ||
|
|
||
| public Duration getBlockDeletionInterval() { | ||
| return Duration.ofMillis(blockDeletionInterval); | ||
| } | ||
|
|
@@ -559,6 +577,10 @@ public int getBlockDeleteQueueLimit() { | |
| return blockDeleteQueueLimit; | ||
| } | ||
|
|
||
| public long getBlockDeleteCommandHandleLockTimeoutMs() { | ||
| return blockDeleteCommandHandleLockTimeoutMs; | ||
| } | ||
|
|
||
| public void setBlockDeleteQueueLimit(int queueLimit) { | ||
| this.blockDeleteQueueLimit = queueLimit; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -226,7 +226,8 @@ public DatanodeStateMachine(DatanodeDetails datanodeDetails, | |
| .addHandler(new CloseContainerCommandHandler()) | ||
| .addHandler(new DeleteBlocksCommandHandler(getContainer(), | ||
| conf, dnConf.getBlockDeleteThreads(), | ||
| dnConf.getBlockDeleteQueueLimit())) | ||
| dnConf.getBlockDeleteQueueLimit(), | ||
| dnConf.getBlockDeleteCommandHandleLockTimeoutMs())) | ||
|
||
| .addHandler(new ReplicateContainerCommandHandler(conf, supervisor, | ||
| pullReplicatorWithMetrics, pushReplicatorWithMetrics)) | ||
| .addHandler(reconstructECContainersCommandHandler) | ||
|
|
||
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.
Typo:
witch->which