Skip to content

Commit

Permalink
correct libraries for use in future (ydb-platform#1628)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed Apr 16, 2024
1 parent 15d6396 commit b39c9b2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ydb/core/tx/tiering/rule/object.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once
#include <ydb/core/protos/flat_scheme_op.pb.h>
#include <ydb/core/tx/columnshard/engines/column_engine.h>
#include <ydb/core/tx/columnshard/engines/scheme/tier_info.h>

#include <ydb/services/metadata/abstract/decoder.h>
#include <ydb/services/metadata/service.h>
#include <ydb/services/metadata/manager/object.h>
Expand Down
1 change: 1 addition & 0 deletions ydb/core/tx/tiering/rule/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PEERDIR(
ydb/services/metadata/abstract
ydb/services/metadata/common
ydb/services/metadata/initializer
ydb/services/metadata/manager
ydb/services/bg_tasks/abstract
ydb/core/tx/schemeshard
)
Expand Down
14 changes: 14 additions & 0 deletions ydb/library/conclusion/result.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,26 @@ class TConclusion {
return *result;
}

TResult& MutableResult() {
auto result = std::get_if<TResult>(&Result);
Y_ABORT_UNLESS(result, "incorrect object for result request");
return *result;
}

TResult&& DetachResult() {
auto result = std::get_if<TResult>(&Result);
Y_ABORT_UNLESS(result, "incorrect object for result request");
return std::move(*result);
}

const TResult* operator->() const {
return &GetResult();
}

TResult* operator->() {
return &MutableResult();
}

const TResult& operator*() const {
return GetResult();
}
Expand Down
2 changes: 2 additions & 0 deletions ydb/services/bg_tasks/abstract/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ class TCommonInterfaceContainer {
}

const IInterface* operator->() const {
AFL_VERIFY(Object);
return Object.get();
}

IInterface* operator->() {
AFL_VERIFY(Object);
return Object.get();
}

Expand Down

0 comments on commit b39c9b2

Please sign in to comment.