IGNITE-23081 Add lease expiration time to configuration#4376
Merged
vldpyatkov merged 6 commits intoapache:mainfrom Sep 17, 2024
Merged
IGNITE-23081 Add lease expiration time to configuration#4376vldpyatkov merged 6 commits intoapache:mainfrom
vldpyatkov merged 6 commits intoapache:mainfrom
Conversation
9d9168e to
7d168b0
Compare
7d168b0 to
6954493
Compare
| /** The interval in milliseconds that is used in the beginning of lease granting process. */ | ||
| @Value(hasDefault = true) | ||
| @Range(min = 0) | ||
| public long agreementAcceptanceInterval = 120_000; |
Contributor
There was a problem hiding this comment.
Suggested change
| public long agreementAcceptanceInterval = 120_000; | |
| public long leaseAgreementAcceptanceTimeLimit = 120_000; |
|
|
||
| /** The interval in milliseconds that is used in the beginning of lease granting process. */ | ||
| @Value(hasDefault = true) | ||
| @Range(min = 0) |
Contributor
There was a problem hiding this comment.
It shouldn't be zero, I'd prefer the default of leaseExpirationInterval
|
|
||
| /** Lease holding interval. */ | ||
| @Value(hasDefault = true) | ||
| @Range(min = 0) |
Contributor
There was a problem hiding this comment.
It shouldn't be zero, at lease it should be greater (preferable several times) than LeaseUpdater#UPDATE_LEASE_MS (500 ms). I would suggest 2000, but it's discussible. Also we should set the max value, maybe default of leaseAgreementAcceptanceTimeLimit?
| HybridTimestamp startTs = clockService.now(); | ||
|
|
||
| var expirationTs = new HybridTimestamp(startTs.getPhysical() + longLeaseInterval, 0); | ||
| long interval = replicationConfiguration.agreementAcceptanceInterval().value(); |
Contributor
There was a problem hiding this comment.
I don't know how fast the values can be retrieved from configuration, are you sure that we shouldn't get this only once per iteration in #updateLeaseBatchInternal?
added 4 commits
September 13, 2024 12:59
denis-chudov
approved these changes
Sep 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/IGNITE-23081