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

feat: add datanode prefix to datanode's data home #118

Merged
merged 2 commits into from
Aug 8, 2023
Merged

Conversation

waynexia
Copy link
Member

@waynexia waynexia commented Aug 8, 2023

This patch add prefix (datanode.x) to the data home path

prev:

DEBUG: component/cluster.go:90] run binary 'greptime' with args: '[--log-level=info datanode start --node-id=1 --metasrv-addr=0.0.0.0:3002 --rpc-addr=0.0.0.0:14101 --http-addr=0.0.0.0:14301 --data-home=.gtctl/mycluster/data/home --wal-dir=.gtctl/mycluster/data/datanode.1/wal]', log: '.gtctl/mycluster/logs/datanode.1', pid: '469492'
DEBUG: component/cluster.go:90] run binary 'greptime' with args: '[--log-level=info datanode start --node-id=2 --metasrv-addr=0.0.0.0:3002 --rpc-addr=0.0.0.0:14102 --http-addr=0.0.0.0:14302 --data-home=.gtctl/mycluster/data/home --wal-dir=.gtctl/mycluster/data/datanode.2/wal]', log: '.gtctl/mycluster/logs/datanode.2', pid: '469493'

after:

DEBUG: component/cluster.go:90] run binary 'greptime' with args: '[--log-level=info datanode start --node-id=1 --metasrv-addr=0.0.0.0:3002 --rpc-addr=0.0.0.0:14101 --http-addr=0.0.0.0:14301 --data-home=.gtctl/mycluster/data/datanode.1/home --wal-dir=.gtctl/mycluster/data/datanode.1/wal]', log: '/.gtctl/mycluster/logs/datanode.1', pid: '484027'
DEBUG: component/cluster.go:90] run binary 'greptime' with args: '[--log-level=info datanode start --node-id=2 --metasrv-addr=0.0.0.0:3002 --rpc-addr=0.0.0.0:14102 --http-addr=0.0.0.0:14302 --data-home=.gtctl/mycluster/data/datanode.2/home --wal-dir=.gtctl/mycluster/data/datanode.2/wal]', log: '.gtctl/mycluster/logs/datanode.2', pid: '484028'

Copy link
Contributor

@shawnh2 shawnh2 left a comment

Choose a reason for hiding this comment

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

if this is the case, the d.dataHome should be type []string

and also in d.Delete method, use for...range to delete each file in d.dataHome

pkg/deployer/baremetal/component/datanode.go Outdated Show resolved Hide resolved
Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia requested a review from shawnh2 August 8, 2023 03:25
@shawnh2 shawnh2 merged commit 4b27b55 into develop Aug 8, 2023
6 checks passed
@shawnh2 shawnh2 deleted the unique-data-home branch August 8, 2023 03:30
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.

2 participants