forked from ydb-platform/ydb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WriteActror settings (ydb-platform#9251)
- Loading branch information
Showing
7 changed files
with
114 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include "kqp_write_actor_settings.h" | ||
|
||
#include <library/cpp/threading/hot_swap/hot_swap.h> | ||
#include <util/generic/singleton.h> | ||
|
||
|
||
namespace NKikimr { | ||
namespace NKqp { | ||
|
||
struct TWriteActorDefaultSettings { | ||
THotSwap<TWriteActorSettings> SettingsPtr; | ||
|
||
TWriteActorDefaultSettings() { | ||
SettingsPtr.AtomicStore(new TWriteActorSettings()); | ||
} | ||
|
||
}; | ||
|
||
TWriteActorSettings GetWriteActorSettings() { | ||
return *Singleton<TWriteActorDefaultSettings>()->SettingsPtr.AtomicLoad(); | ||
} | ||
|
||
void SetWriteActorSettings(TIntrusivePtr<TWriteActorSettings> ptr) { | ||
Singleton<TWriteActorDefaultSettings>()->SettingsPtr.AtomicStore(ptr); | ||
} | ||
|
||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#pragma once | ||
|
||
#include <util/generic/ptr.h> | ||
#include <util/datetime/base.h> | ||
#include <util/generic/size_literals.h> | ||
|
||
namespace NKikimr { | ||
namespace NKqp { | ||
|
||
struct TWriteActorSettings : TAtomicRefCount<TWriteActorSettings> { | ||
i64 InFlightMemoryLimitPerActorBytes = 64_MB; | ||
i64 MemoryLimitPerMessageBytes = 64_MB; | ||
i64 MaxBatchesPerMessage = 1000; | ||
|
||
TDuration StartRetryDelay = TDuration::Seconds(1); | ||
TDuration MaxRetryDelay = TDuration::Seconds(10); | ||
double UnsertaintyRatio = 0.5; | ||
double Multiplier = 2.0; | ||
|
||
ui64 MaxWriteAttempts = 100; | ||
ui64 MaxResolveAttempts = 5; | ||
}; | ||
|
||
TWriteActorSettings GetWriteActorSettings(); | ||
void SetWriteActorSettings(TIntrusivePtr<TWriteActorSettings> ptr); | ||
|
||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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