-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mds: add set logicalpool status #221
Conversation
e47fa59
to
049ebf7
Compare
@@ -103,7 +103,7 @@ class LogicalPool { | |||
type_(PAGEFILE), | |||
initialScatterWidth_(0), | |||
createTime_(0), | |||
status_(AllocateStatus::DENY), | |||
status_(AllocateStatus::ALLOW), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里默认为什么调整为Allow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有DENY的测试用例吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是因为当前线上的版本,logicalpool在创建时就是默认会修改为Allow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有DENY的测试用例吗
有,见 test/mds/topology/test_topology.cpp:1116, UpdateLogicalPoolAllocateStatus_success 这个用例
@@ -345,6 +344,7 @@ message CreateLogicalPoolRequest { | |||
required bytes redundanceAndPlaceMentPolicy = 5; //json body | |||
required bytes userPolicy = 6; //json body | |||
optional uint32 scatterWidth = 7; //生成copyset依据的scatterWidth平均值 | |||
optional AllocateStatus status = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit message中以涉及到修改的模块开头
mds: ****
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
proto/topology.proto
Outdated
@@ -387,6 +387,14 @@ message ListLogicalPoolResponse { | |||
repeated LogicalPoolInfo logicalPoolInfos = 2; | |||
} | |||
|
|||
message SetLogicalPoolRequest { | |||
optional uint32 logicalPoolID = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么是optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -103,7 +103,7 @@ class LogicalPool { | |||
type_(PAGEFILE), | |||
initialScatterWidth_(0), | |||
createTime_(0), | |||
status_(AllocateStatus::DENY), | |||
status_(AllocateStatus::ALLOW), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有DENY的测试用例吗
@@ -1086,6 +1117,51 @@ int CurvefsTools::SetChunkServer() { | |||
return 0; | |||
} | |||
|
|||
int CurvefsTools::SetLogicalPool() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个没有测试用例吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个工具一直都没有单元测试的,目前都是手工测试
recheck |
Signed-off-by: lucperkins <lucperkins@gmail.com>
What problem does this PR solve?
add allocate status when create logicalpool and add SetLogicalPool to tools
Issue Number: close #xxx
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List