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

support incremental formatting #288

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

liuminjian
Copy link

@liuminjian liuminjian commented Aug 15, 2023

This pr resolves #189 .

新增参数--increment
image

@liuminjian
Copy link
Author

@caoxianfei1

@caoxianfei1
Copy link
Contributor

@caoxianfei1

got!

@caoxianfei1
Copy link
Contributor

@liuminjian squash one commit.

@liuminjian
Copy link
Author

@liuminjian squash one commit.

done

-fileSystemPath=$chunkfile_pool_dir
fi


Copy link
Contributor

Choose a reason for hiding this comment

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

The parameters of curve_format is incremental precent default and seems to be unnecessary to modify the script.

@liuminjian liuminjian force-pushed the feat/incr-format branch 2 times, most recently from 8e18359 to d7c2108 Compare September 11, 2023 09:26

if [ $minus -gt 0 ]
then
$binary \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it not works, do you have test it?

Copy link
Author

@liuminjian liuminjian Oct 8, 2023

Choose a reason for hiding this comment

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

I have tested it
image
image

@liuminjian liuminjian requested a review from Wine93 October 9, 2023 02:02
@liuminjian liuminjian force-pushed the feat/incr-format branch 2 times, most recently from 8984710 to c592f95 Compare October 10, 2023 09:17
@@ -131,6 +134,7 @@ func genFormatPlaybook(curveadm *cli.CurveAdm,
stopFormat := options.stopFormat
debug := options.debug
clean := options.clean
increment := options.increment

steps := FORMAT_PLAYBOOK_STEPS
if showStatus {
Copy link
Contributor

Choose a reason for hiding this comment

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

may be we can use playbook playbook.STOP_SERVICE.
for example:

 FORMAT_INCREMENT_PLAYBOOK_STEPS := int[]{
  playbook.STOP_SERVICE,
  playbook.FORMAT_CHUNKFILE_POOL,
}

if increment {
  steps = FORMAT_INCREMENT_PLAYBOOK_STEPS
}

stopChunkServercs = curveadm.FilterDeployConfig(dcs, topology.FilterOption{
		Role: "chunkserver",
})
if len(stopChunkServercs) == 0 {
	// no chunkserver
}
if step == playbook.STOP_SERVICE {
     pb.AddStep(&playbook.PlaybookStep{
        ...
        Configs: stopChunkServercs
     } else ...
}

Copy link
Author

Choose a reason for hiding this comment

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

done

@liuminjian liuminjian force-pushed the feat/incr-format branch 2 times, most recently from 51eac15 to ddfb79a Compare October 11, 2023 07:41
Signed-off-by: liuminjian <[email protected]>

support incremental formatting

Signed-off-by: liuminjian <[email protected]>

support incremental formatting

Signed-off-by: liuminjian <[email protected]>
@caoxianfei1
Copy link
Contributor

LGTM!

Copy link
Collaborator

@Wine93 Wine93 left a comment

Choose a reason for hiding this comment

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

LGTM!

@caoxianfei1 caoxianfei1 merged commit 279c590 into opencurve:develop Oct 12, 2023
6 checks passed
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.

[Feature] support incremental formatting
3 participants