Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(admin): refresh cluster metadata while adding storage node
It fixes a transient error caused by fetching cluster metadata too lately while handling AddStorageNode. This PR lets the AddStorageNode RPC handler fetch the cluster metadata forcibly. Although it isn't a critical error and can be resolved through a simple retry, it is resolved quickly by fetching the cluster metadata. Error example: ``` --- FAIL: TestVarlogAppend (5.38s) controller.go:62: Error Trace: /home/runner/work/varlog/varlog/tests/ee/controller/controller.go:62 /home/runner/work/varlog/varlog/tests/ee/cluster/local/cluster.go:238 /home/runner/work/varlog/varlog/tests/ee/cluster/local/cluster.go:63 /home/runner/work/varlog/varlog/tests/ee/ee_test.go:32 Error: Received unexpected error: exit status 255 Test: TestVarlogAppend Messages: /home/runner/work/varlog/varlog/bin/varlogctl storagenode add --storage-node-id 1 --storage-node-address 127.0.0.1:20001 --admin 127.0.0.1:9093: rpc error: code = Unavailable desc = add storage node: call again ```
- Loading branch information