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 7
7
#include < yql/essentials/core/issue/yql_issue.h>
8
8
9
9
namespace NKikimr ::NOlap::NReader {
10
- constexpr i64 DEFAULT_READ_AHEAD_BYTES = (i64 )2 * 1024 * 1024 * 1024 ;
11
10
constexpr TDuration SCAN_HARD_TIMEOUT = TDuration::Minutes(10 );
12
11
constexpr TDuration SCAN_HARD_TIMEOUT_GAP = TDuration::Seconds(5 );
13
12
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
42
13
43
14
void TColumnShardScan::PassAway () {
44
15
Send (ResourceSubscribeActorId, new TEvents::TEvPoisonPill);
You can’t perform that action at this time.
0 commit comments