Skip to content
This repository was archived by the owner on Apr 26, 2022. It is now read-only.

feat: add node, disk, server, remote-command related command #1

Merged
neverchanje merged 26 commits intopegasus-kv:mainfrom
foreverneverer:disk_cmd
Nov 25, 2020
Merged

feat: add node, disk, server, remote-command related command #1
neverchanje merged 26 commits intopegasus-kv:mainfrom
foreverneverer:disk_cmd

Conversation

@foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented Nov 20, 2020

Add commend:

# list node info
>>> nodes
# disk info
>>> disk-replica 
>>> disk-capacity
# disk migrate
>>> disk-migrate
# server info
>>> server-info
# remote command
>>> remote-command

command -h see detail argument

@foreverneverer foreverneverer marked this pull request as ready for review November 23, 2020 10:44
if err != nil {
return nil, err
}
return aggregate.NewPerfSession(addr), nil
Copy link
Contributor

Choose a reason for hiding this comment

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

use PerfClient instead, PerfSession is low level primitive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know PerfClient, I only use one node session to query counter, but query all node and then filter one of them

Copy link
Contributor

Choose a reason for hiding this comment

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

i think we do not need remote command anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So how to control the dynamic config? such as only_move_primary

Copy link
Contributor

Choose a reason for hiding this comment

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

Call meta list nodes every time you validate an address... this is inefficient

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can store it in cache at first call?

Copy link
Contributor

@neverchanje neverchanje Nov 24, 2020

Choose a reason for hiding this comment

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

Cache it in other places. Before calling validateReplicaAddress, you must ensure nodes are prepared already.

This is a basic responsibility separation principle. You can not list nodes in a validation function.

@foreverneverer foreverneverer changed the title feat: add node and disk related command feat: add node, disk,remote-command reelated command Nov 24, 2020
@foreverneverer foreverneverer changed the title feat: add node, disk,remote-command reelated command feat: add node, disk, server,remote-command related command Nov 24, 2020
@foreverneverer foreverneverer changed the title feat: add node, disk, server,remote-command related command feat: add node, disk, server, remote-command related command Nov 24, 2020
Comment on lines 34 to 41
Copy link
Contributor

Choose a reason for hiding this comment

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

Basically no use case for remote-command all, remove this subcommand.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments