File tree Expand file tree Collapse file tree 1 file changed +0
-29
lines changed
ydb/core/tx/columnshard/engines/reader/actor Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change 77#include < yql/essentials/core/issue/yql_issue.h>
88
99namespace NKikimr ::NOlap::NReader {
10- constexpr i64 DEFAULT_READ_AHEAD_BYTES = (i64 )2 * 1024 * 1024 * 1024 ;
1110constexpr TDuration SCAN_HARD_TIMEOUT = TDuration::Minutes(10 );
1211constexpr TDuration SCAN_HARD_TIMEOUT_GAP = TDuration::Seconds(5 );
1312
14- namespace {
15- class TInFlightGuard : NNonCopyable::TNonCopyable {
16- private:
17- static inline TAtomicCounter InFlightGlobal = 0 ;
18- i64 InFlightGuarded = 0 ;
19-
20- public:
21- ~TInFlightGuard () {
22- Return (InFlightGuarded);
23- }
24-
25- bool CanTake () {
26- return InFlightGlobal.Val () < DEFAULT_READ_AHEAD_BYTES || !InFlightGuarded;
27- }
28-
29- void Take (const ui64 bytes) {
30- InFlightGlobal.Add (bytes);
31- InFlightGuarded += bytes;
32- }
33-
34- void Return (const ui64 bytes) {
35- Y_ABORT_UNLESS (InFlightGlobal.Sub (bytes) >= 0 );
36- InFlightGuarded -= bytes;
37- Y_ABORT_UNLESS (InFlightGuarded >= 0 );
38- }
39- };
40-
41- } // namespace
4213
4314void TColumnShardScan::PassAway () {
4415 Send (ResourceSubscribeActorId, new TEvents::TEvPoisonPill);
You can’t perform that action at this time.
0 commit comments