Skip to content

feat(log): optimize checkpoint log print#5383

Merged
halibobo1205 merged 1 commit intotronprotocol:developfrom
lurais:feature/optimize_checkpoint_log
Aug 9, 2023
Merged

feat(log): optimize checkpoint log print#5383
halibobo1205 merged 1 commit intotronprotocol:developfrom
lurais:feature/optimize_checkpoint_log

Conversation

@lurais
Copy link
Copy Markdown
Contributor

@lurais lurais commented Jul 28, 2023

What does this PR do?
Add log to suggest to change the checkpoint config when it try to convert from v2 to v1 while the error info is printed.
Why are these changes required?
To improve user friendliness.

if (cpList != null && cpList.size() != 0) {
logger.error("checkpoint check failed, can't convert checkpoint from v2 to v1");
logger.error("checkpoint check failed, can't convert checkpoint from v2 to v1," +
" please set checkpoint.version = 2");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

where can be found for checkpoint.version ?

if (cpList != null && cpList.size() != 0) {
logger.error("checkpoint check failed, can't convert checkpoint from v2 to v1");
logger.error("checkpoint check failed, can't convert checkpoint from v2 to v1," +
" please set checkpoint.version = 2 in your config file and restart it.");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

how and where for config if checkpoint.version is missed ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe a full config path is better: storage.checkpoint.version

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

how and where for config if checkpoint.version is missed ?

The full path is needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

change and restart it to and restart or and restart the node?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Change to ''and restart the node'' seems to be more precise.

@halibobo1205 halibobo1205 linked an issue Jul 31, 2023 that may be closed by this pull request
@tomatoishealthy
Copy link
Copy Markdown
Contributor

You can merge the commits by using git rebase

@lurais lurais force-pushed the feature/optimize_checkpoint_log branch from 47ff6f6 to 71426df Compare August 2, 2023 11:08
@lurais
Copy link
Copy Markdown
Contributor Author

lurais commented Aug 2, 2023

You can merge the commits by using git rebase

done. @guoquanwu

List<String> cpList = getCheckpointList();
if (cpList != null && cpList.size() != 0) {
logger.error("checkpoint check failed, can't convert checkpoint from v2 to v1");
logger.error("checkpoint check failed, can't convert checkpoint from v2 to v1," +
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

may be not converted by user, the database can be downloaded from somewhere

Copy link
Copy Markdown
Contributor Author

@lurais lurais Aug 3, 2023

Choose a reason for hiding this comment

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

@halibobo1205 The reason should be the database not match to the config file, so just print " the checkpoint version of database not match your config file ,please ..." ?

@lurais lurais force-pushed the feature/optimize_checkpoint_log branch from 71426df to f993740 Compare August 5, 2023 14:32
Copy link
Copy Markdown
Collaborator

@halibobo1205 halibobo1205 left a comment

Choose a reason for hiding this comment

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

LGTM

@halibobo1205
Copy link
Copy Markdown
Collaborator

@lurais Please fix CI test.

@lurais
Copy link
Copy Markdown
Contributor Author

lurais commented Aug 7, 2023

@lurais Please fix CI test.

ok @halibobo1205

Copy link
Copy Markdown
Contributor

@tomatoishealthy tomatoishealthy left a comment

Choose a reason for hiding this comment

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

LGTM

@halibobo1205 halibobo1205 merged commit 56efc4e into tronprotocol:develop Aug 9, 2023
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.7.3 milestone Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Give suggestion about checkpoint v2 error info

3 participants