-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possibility to do lite reallocations (#2247)
- Loading branch information
1 parent
afd77c1
commit a835bd6
Showing
18 changed files
with
317 additions
and
29 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
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
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
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
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 |
---|---|---|
|
@@ -112,4 +112,3 @@ void TVolumeActor::CompleteReadHistory( | |
} | ||
|
||
} // namespace NCloud::NBlockStore::NStorage | ||
|
64 changes: 64 additions & 0 deletions
64
cloud/blockstore/libs/storage/volume/volume_actor_read_meta_history.cpp
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,64 @@ | ||
#include "volume_actor.h" | ||
|
||
#include "volume_database.h" | ||
|
||
#include <cloud/blockstore/libs/storage/core/proto_helpers.h> | ||
#include <cloud/blockstore/libs/storage/core/request_info.h> | ||
|
||
namespace NCloud::NBlockStore::NStorage { | ||
|
||
using namespace NActors; | ||
|
||
using namespace NKikimr; | ||
using namespace NKikimr::NTabletFlatExecutor; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
void TVolumeActor::HandleReadMetaHistory( | ||
const TEvVolumePrivate::TEvReadMetaHistoryRequest::TPtr& ev, | ||
const NActors::TActorContext& ctx) | ||
{ | ||
auto* msg = ev->Get(); | ||
auto requestInfo = | ||
CreateRequestInfo(ev->Sender, ev->Cookie, msg->CallContext); | ||
AddTransaction(*requestInfo); | ||
|
||
ExecuteTx<TReadMetaHistory>(ctx, std::move(requestInfo)); | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
bool TVolumeActor::PrepareReadMetaHistory( | ||
const TActorContext& ctx, | ||
TTransactionContext& tx, | ||
TTxVolume::TReadMetaHistory& args) | ||
{ | ||
Y_UNUSED(ctx); | ||
|
||
TVolumeDatabase db(tx.DB); | ||
return db.ReadMetaHistory(args.MetaHistory); | ||
} | ||
|
||
void TVolumeActor::ExecuteReadMetaHistory( | ||
const TActorContext& ctx, | ||
TTransactionContext& tx, | ||
TTxVolume::TReadMetaHistory& args) | ||
{ | ||
Y_UNUSED(ctx); | ||
Y_UNUSED(tx); | ||
Y_UNUSED(args); | ||
} | ||
|
||
void TVolumeActor::CompleteReadMetaHistory( | ||
const TActorContext& ctx, | ||
TTxVolume::TReadMetaHistory& args) | ||
{ | ||
auto response = | ||
std::make_unique<TEvVolumePrivate::TEvReadMetaHistoryResponse>(); | ||
response->MetaHistory = std::move(args.MetaHistory); | ||
NCloud::Reply(ctx, *args.RequestInfo, std::move(response)); | ||
|
||
RemoveTransaction(*args.RequestInfo); | ||
} | ||
|
||
} // namespace NCloud::NBlockStore::NStorage |
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
Oops, something went wrong.