Skip to content
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

Merged
merged 1 commit into from
Jan 26, 2021
Merged

Conversation

xu-chaojie
Copy link
Member

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

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

@xu-chaojie xu-chaojie force-pushed the master branch 2 times, most recently from e47fa59 to 049ebf7 Compare January 15, 2021 07:28
@xu-chaojie xu-chaojie closed this Jan 15, 2021
@xu-chaojie xu-chaojie reopened this Jan 15, 2021
@xu-chaojie xu-chaojie closed this Jan 15, 2021
@xu-chaojie xu-chaojie reopened this Jan 15, 2021
@xu-chaojie xu-chaojie closed this Jan 15, 2021
@xu-chaojie xu-chaojie reopened this Jan 15, 2021
@@ -103,7 +103,7 @@ class LogicalPool {
type_(PAGEFILE),
initialScatterWidth_(0),
createTime_(0),
status_(AllocateStatus::DENY),
status_(AllocateStatus::ALLOW),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里默认为什么调整为Allow?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有DENY的测试用例吗

Copy link
Member Author

@xu-chaojie xu-chaojie Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是因为当前线上的版本,logicalpool在创建时就是默认会修改为Allow

Copy link
Member Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit message中以涉及到修改的模块开头
mds: ****

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -387,6 +387,14 @@ message ListLogicalPoolResponse {
repeated LogicalPoolInfo logicalPoolInfos = 2;
}

message SetLogicalPoolRequest {
optional uint32 logicalPoolID = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么是optional

Copy link
Member Author

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),
Copy link
Contributor

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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个没有测试用例吗

Copy link
Member Author

@xu-chaojie xu-chaojie Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个工具一直都没有单元测试的,目前都是手工测试

@ilixiaocui ilixiaocui changed the title add set logicalpool status mds: add set logicalpool status Jan 26, 2021
@xu-chaojie
Copy link
Member Author

recheck

@ilixiaocui ilixiaocui merged commit f47b5c7 into opencurve:master Jan 26, 2021
ilixiaocui pushed a commit to ilixiaocui/curve that referenced this pull request Feb 6, 2023
Signed-off-by: lucperkins <lucperkins@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants