Skip to content

Conversation

@dkropachev
Copy link
Contributor

@dkropachev dkropachev commented Mar 18, 2025

Provision multi DC cluster and list initial_token:

rm -rf ~/.ccm/test
ccm create test -i 127.0.0. -n 4:0 -v release:6.2 --scylla
cat ~/.ccm/test/*/node.conf | grep init
initial_token: -9223372036854775808
initial_token: -9223372036854775708

As you can see only two nodes got initial_token
To fix that we need to pass node_locations to balanced_tokens_across_dcs And have ti fixed a bit.

After the fix:

rm -rf ~/.ccm/test
ccm create test -i 127.0.0. -n 4:0 -v release:6.2 --scylla
cat ~/.ccm/test/*/node.conf | grep init
Current cluster is now: test
initial_token: -9223372036854775808
initial_token: -4611686018427387904
initial_token: 0
initial_token: 4611686018427387904

Fixes: #642

Provision multi DC cluster and list `initial_token`:
```
rm -rf ~/.ccm/test
ccm create test -i 127.0.0. -n 4:0 -v release:6.2 --scylla
cat ~/.ccm/test/*/node.conf | grep init
initial_token: -9223372036854775808
initial_token: -9223372036854775708
```

As you can see only two nodes got `initial_token`
To fix that we need to pass `node_locations` to `balanced_tokens_across_dcs`
And have ti fixed a bit.
@dkropachev
Copy link
Contributor Author

@fruch , @Bouncheck

@fruch
Copy link
Contributor

fruch commented Mar 18, 2025

  1. not sure how one of the nodes has 0, I don't understand the logic here
  2. we should run dtest gating to validate it's not breaking (not that I think any dtest is using this option)

EDIT: there a few test that do use it: https://github.com/search?q=repo%3Ascylladb%2Fscylla-dtest%20initial_token&type=code

@dkropachev
Copy link
Contributor Author

@fruch , isreal, can you please approve the pipeline

@dkropachev
Copy link
Contributor Author

  1. not sure how one of the nodes has 0, I don't understand the logic here
  2. we should run dtest gating to validate it's not breaking (not that I think any dtest is using this option)

EDIT: there a few test that do use it: https://github.com/search?q=repo%3Ascylladb%2Fscylla-dtest%20initial_token&type=code

Running: https://jenkins.scylladb.com/view/staging/job/scylla-staging/job/dkropachev/job/dtest-gating/2

@dkropachev
Copy link
Contributor Author

dkropachev commented Mar 18, 2025

@fruch , Two runs failed at the same test:

        if found_errors:
            logger.error(f"Unexpected errors found: {found_errors}")
            errors_summary = "\n".join([f"{node}: {len(errors)} errors\n" + "\n".join(errors[:5]) for node, errors in found_errors])
>           raise AssertionError(f"Unexpected errors found:\n{errors_summary}")
E           AssertionError: Unexpected errors found:
E           node1: 1 errors
E           ERROR 2025-03-18 16:01:01,423 [shard 0:main] seastar_memory - seastar/src/core/memory.cc:2126 @void seastar::memory::maybe_dump_memory_diagnostics(size_t, bool): failed to log message: fmt='Failed to allocate {} bytes at {}': std::bad_alloc (std::bad_alloc)

It is known problem, we can consider it passed.

@dkropachev dkropachev requested a review from fruch March 19, 2025 17:46
Copy link
Contributor

@fruch fruch left a comment

Choose a reason for hiding this comment

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

LGTM

@fruch fruch merged commit 5fdd9ae into scylladb:master Mar 19, 2025
4 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.

Initial token calculation for multiple DC is broken

2 participants