7
7
8
8
namespace NKikimr ::NBlobDepot {
9
9
10
+ struct TUncertaintyResolverScope {
11
+ enum class EKeyBlobState {
12
+ INITIAL, // just created blob, no activity
13
+ QUERY_IN_FLIGHT, // blob should have BlobContext referring to this key too
14
+ CONFIRMED, // we got OK for this blob
15
+ WASNT_WRITTEN, // we got NODATA for this blob, this key needs to be deleted if possible
16
+ ERROR, // we got ERROR or any other reply for this blob
17
+ };
18
+ };
19
+
10
20
class TBlobDepot ::TData::TUncertaintyResolver {
21
+ using EKeyBlobState = TUncertaintyResolverScope::EKeyBlobState;
11
22
TBlobDepot* const Self;
12
23
13
24
struct TPendingUncertainKey {};
@@ -21,14 +32,6 @@ namespace NKikimr::NBlobDepot {
21
32
{}
22
33
};
23
34
24
- enum class EKeyBlobState {
25
- INITIAL, // just created blob, no activity
26
- QUERY_IN_FLIGHT, // blob should have BlobContext referring to this key too
27
- CONFIRMED, // we got OK for this blob
28
- WASNT_WRITTEN, // we got NODATA for this blob, this key needs to be deleted if possible
29
- ERROR, // we got ERROR or any other reply for this blob
30
- };
31
-
32
35
struct TKeyContext {
33
36
// requests dependent on this key
34
37
std::vector<TIntrusivePtr<TResolveOnHold>> DependentRequests;
@@ -52,16 +55,6 @@ namespace NKikimr::NBlobDepot {
52
55
ui64 NumKeysUnresolved = 0 ;
53
56
ui64 NumKeysDropped = 0 ;
54
57
55
- friend void Out<EKeyBlobState>(IOutputStream& s, EKeyBlobState value) {
56
- switch (value) {
57
- case EKeyBlobState::INITIAL: s << " INITIAL" ; break ;
58
- case EKeyBlobState::QUERY_IN_FLIGHT: s << " QUERY_IN_FLIGHT" ; break ;
59
- case EKeyBlobState::CONFIRMED: s << " CONFIRMED" ; break ;
60
- case EKeyBlobState::WASNT_WRITTEN: s << " WASNT_WRITTEN" ; break ;
61
- case EKeyBlobState::ERROR: s << " ERROR" ; break ;
62
- }
63
- }
64
-
65
58
public:
66
59
TUncertaintyResolver (TBlobDepot *self);
67
60
void PushResultWithUncertainties (TResolveResultAccumulator&& result, std::deque<TKey>&& uncertainties);
0 commit comments