-
Notifications
You must be signed in to change notification settings - Fork 616
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 6 commits
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 |
|---|---|---|
|
|
@@ -188,6 +188,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", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest change the property name from block.delete.command.handle.lock.timeout ->
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xichen01 , is the slow RocksDB open a major cause behind this patch? I have one question, it takes 200ms to open a rocksdb, you set this timeout to 100ms, and retry once in the block deletion logic, why not set the default value to 200ms, with a simpler handler logic?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this property be a reconfigurable property?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment may have caused some misunderstanding, I'll modify it. The retry does not happen immediately, it waits until all Slow RocksDB open (Schema V2 only), rebalancer,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xichen01 , thanks for the further info. |
||
| 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); | ||
| } | ||
|
|
@@ -573,6 +591,10 @@ public int getBlockDeleteQueueLimit() { | |
| return blockDeleteQueueLimit; | ||
| } | ||
|
|
||
| public long getBlockDeleteCommandHandleLockTimeoutMs() { | ||
| return blockDeleteCommandHandleLockTimeoutMs; | ||
| } | ||
|
|
||
| public void setBlockDeleteQueueLimit(int queueLimit) { | ||
| this.blockDeleteQueueLimit = queueLimit; | ||
| } | ||
|
|
||
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.
which was failed cause by wait Container lock timeout -> which failed due to container lock wait timeout
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.
Done.