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
HDDS-1816: ContainerStateMachine should limit number of pending apply transactions #1150
Conversation
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
int maxPendingApplyTransactions = conf.getInt( | ||
ScmConfigKeys.DFS_CONTAINER_RATIS_STATEMACHINE_MAX_PENDING_APPLY_TRANSACTIONS, | ||
ScmConfigKeys.DFS_CONTAINER_RATIS_STATEMACHINE_MAX_PENDING_APPLY_TRANSACTIONS_DEFAULT); | ||
applyTransactionSemaphore = new Semaphore(maxPendingApplyTransactions); |
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.
Question: Here do we need fair setting, to follow the order?
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.
@bharatviswa504 Thanks for reviewing the changes! We do not need a fair setting as in Ratis StateMachineUpdater the call to applyTransaction is serialized.
Thanks @lokeshj1703 for working on this. As discussed offline, let's make the default value of the limit equal to snapshot interval in terms of log transactions as in any case, during restart snapshotIndex will determine how many entries from the log will be pending to be applied. |
@bshashikant Thanks for reviewing the PR! I have pushed commit addressing the comment. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
… transactions. Adds a config, uses snapshot threshold default value.
Latest commit brings back the config for maximum number of pending apply transactions, uses snapshot threshold default value as default value for the config. |
💔 -1 overall
This message was automatically generated. |
The patch looks good to me . +1 . |
Checkstyle seems to be related: https://issues.apache.org/jira/browse/HDDS-1878 |
…removed (apache#1150) In the previous PR: https://github.com/apache/samza/pull/1010/files config with null/empty values will be filter out when reading the coordinator stream, this will cause some problems when the user expects an empty string to be a value config.
… transactions. Adds a config, uses snapshot threshold default value. (apache#1150)
ContainerStateMachine should limit number of pending apply transactions in order to avoid excessive heap usage by the pending transactions.