[#1449] tree: Add ApplyBatch method
Concurrent Apply can lead to child node applies before parent, so undo/redo operations will perform. This leads to performance degradation in case of tree with many sublevels. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
16830033f8
commit
9bd05e94c8
15 changed files with 180 additions and 21 deletions
|
@ -41,6 +41,7 @@ type cfg struct {
|
|||
replicatorTimeout time.Duration
|
||||
containerCacheSize int
|
||||
authorizedKeys [][]byte
|
||||
syncBatchSize int
|
||||
|
||||
localOverrideStorage policyengine.LocalOverrideStorage
|
||||
morphChainStorage policyengine.MorphRuleChainStorageReader
|
||||
|
@ -113,6 +114,12 @@ func WithReplicationWorkerCount(n int) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func WithSyncBatchSize(n int) Option {
|
||||
return func(c *cfg) {
|
||||
c.syncBatchSize = n
|
||||
}
|
||||
}
|
||||
|
||||
func WithContainerCacheSize(n int) Option {
|
||||
return func(c *cfg) {
|
||||
if n > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue