-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge to stable-23-3: some important fixes and TODO implementations f…
…or multitablet filesystems + some minor fixes/enhancements in filestore in general (#1523) * [Filestore] Add stat command to filestore client (#1453) Issue: #1474 * fixed filestore-client crash upon empty dir ls, added ls+rm+write test for filestore-client (#1505) * fixed filestore-client crash upon empty dir ls, added ls+rm+write test for filestore-client * fixed filestore-client crash upon empty dir ls, added ls+rm+write test for filestore-client - forgot client.py * issue-1350: simplified node creation in follower code, added a test for errors received from follower in this case, fixed DupCache entry commitment in CreateHandle, made TabletProxy immortal, deleted inactive pipe tracking and closure in TabletProxy, added some comments, fixed logging a bit (#1511) * issue-1350: simplified node creation in follower code, added a test for errors received from follower in this case, added some comments, fixed logging a bit * issue-1350: CreateHandle - if we need to create a node in one of the followers, we still need to commit DupCache entry; * issue-1350: TabletProxy should never die, TabletProxy should not track and close idle connections - 1. there is no need for that 2. it breaks leader<->follower session creation logic * filestore loop shutdown: 1. E_CANCELLED code shouldn't be wrapped into MAKE_FILESTORE_ERROR 2. CompletionQueue should be notified about request cancellation (#1520) * filestore loop shutdown: 1. E_CANCELLED code shouldn't be wrapped into MAKE_FILESTORE_ERROR 2. CompletionQueue should be notified about request cancellation * filestore loop shutdown: 1. E_CANCELLED code shouldn't be wrapped into MAKE_FILESTORE_ERROR 2. CompletionQueue should be notified about request cancellation - added missing include * filestore loop shutdown: 1. E_CANCELLED code shouldn't be wrapped into MAKE_FILESTORE_ERROR 2. CompletionQueue should be notified about request cancellation - added missing include * filestore loop shutdown: 1. E_CANCELLED code shouldn't be wrapped into MAKE_FILESTORE_ERROR 2. CompletionQueue should be notified about request cancellation - fixed build * issue-1350: implementing multitablet fs TODOs - DestroySession in followers, UnlinkNode (#1521) * issue-1350: destroying sessions in follower upon session destruction in leader * issue-1350: removing node refs in leader and unlinking nodes in followers upon UnlinkNode requests to leader * issue-1350: 1. Cleanup is given priority over Compaction by default since it's much faster and lighter but generally brings similar results (configurable via StorageServiceConfig) 2. Outputting follower info on monpage (#1522) * issue-1350: 1. Cleanup is given priority over Compaction by default since it's much faster and lighter but generally brings similar results (configurable via StorageServiceConfig) 2. Outputting follower info on monpage * issue-1350: deleted unneeded include * fixed CMakeLists.txt --------- Co-authored-by: Anton Myagkov <antomyagkov@gmail.com>
- Loading branch information
1 parent
e6549f6
commit da542e4
Showing
37 changed files
with
965 additions
and
151 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#include "command.h" | ||
|
||
#include <cloud/filestore/public/api/protos/fs.pb.h> | ||
|
||
#include <util/datetime/base.h> | ||
#include <util/stream/file.h> | ||
#include <util/system/sysstat.h> | ||
|
||
namespace NCloud::NFileStore::NClient { | ||
|
||
namespace { | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
void Print(const NProto::TNodeAttr& nodeAttr, bool jsonOutput) { | ||
|
||
if (jsonOutput) { | ||
Cout << nodeAttr.AsJSON() << Endl; | ||
} else { | ||
Cout << nodeAttr.DebugString() << Endl; | ||
} | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
class TStatCommand final: public TFileStoreCommand | ||
{ | ||
private: | ||
TString Path; | ||
|
||
public: | ||
TStatCommand() | ||
{ | ||
Opts.AddLongOption("path") | ||
.Required() | ||
.RequiredArgument("PATH") | ||
.StoreResult(&Path); | ||
} | ||
|
||
bool Execute() override | ||
{ | ||
CreateSession(); | ||
|
||
const auto resolved = ResolvePath(Path, false); | ||
Y_ABORT_UNLESS(resolved.size() >= 2); | ||
|
||
auto request = CreateRequest<NProto::TGetNodeAttrRequest>(); | ||
request->SetNodeId(resolved[resolved.size() - 2].Node.GetId()); | ||
request->SetName(ToString(resolved.back().Name)); | ||
auto response = WaitFor( | ||
Client->GetNodeAttr(PrepareCallContext(), std::move(request))); | ||
|
||
CheckResponse(response); | ||
Print(response.GetNode(), JsonOutput); | ||
return true; | ||
} | ||
}; | ||
|
||
} // namespace | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
TCommandPtr NewStatCommand() | ||
{ | ||
return std::make_shared<TStatCommand>(); | ||
} | ||
|
||
} // namespace NCloud::NFileStore::NClient |
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 |
---|---|---|
|
@@ -23,6 +23,7 @@ SRCS( | |
resize.cpp | ||
rm.cpp | ||
start_endpoint.cpp | ||
stat.cpp | ||
stop_endpoint.cpp | ||
text_table.cpp | ||
touch.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
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
Oops, something went wrong.