-
Notifications
You must be signed in to change notification settings - Fork 580
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
[v23.2.x] Simplified mapping transaction id to coordinator partition #15345
Merged
mmaslankaprv
merged 31 commits into
redpanda-data:v23.2.x
from
mmaslankaprv:v23.2.x-migration
Dec 7, 2023
Merged
[v23.2.x] Simplified mapping transaction id to coordinator partition #15345
mmaslankaprv
merged 31 commits into
redpanda-data:v23.2.x
from
mmaslankaprv:v23.2.x-migration
Dec 7, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmaslankaprv
force-pushed
the
v23.2.x-migration
branch
3 times, most recently
from
December 6, 2023 20:49
d735f3e
to
e7e75d3
Compare
Intoducing tx_registry_stm a tx registry service will be based on. tx_registry_stm is modeled after is_allocator_stm and doesn't rely on cleanup policy to control the size of the log. Instead the stm does prefix truncation on its own then the size of the log passes _log_capacity batches. (cherry picked from commit 53c8f56)
(cherry picked from commit e8fdbfd)
try_init_hosted_transactions check if hosted transactions are initialized and if they don't try_init_hosted_transactions takes the write lock and initilized the transactions. However while the method waits for the write lock the state may change so to avoid hosted txs from being initialized twice it's necessary to check the state again after the lock is taken. (cherry picked from commit 39f2ec1)
Removing `tm_` prefix because the types overgrown transaction manager (coordinator) and will be reused within tx registry (cherry picked from commit c48eba4)
(cherry picked from commit 646cdfe)
(cherry picked from commit b365bc1)
(cherry picked from commit 27e918b)
(cherry picked from commit b181036)
(cherry picked from commit 05e4912)
(cherry picked from commit 28909fe)
(cherry picked from commit 505d2cd)
(cherry picked from commit a08f301)
(cherry picked from commit 846b04d)
(cherry picked from commit 5d51079)
(cherry picked from commit 0470b04)
(cherry picked from commit ac36670)
kafka protocol doesn't require a broker to forward init_tm_tx to a leader and expects that it's a client responsibility to find who's the leader Fixes redpanda-data#6418 (cherry picked from commit 7bc98c9)
(cherry picked from commit 8a37809)
(cherry picked from commit 0c2bc0b)
Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit eb3b5e0)
Implemented simple static assignment of transaction id (application identifier) to `kafka_internal/tx` topic partition. The mapping is based on a simple mechanism where the whole transactional id hash range is equally divided between all the transaction coordinator partitions. The new transaction id assignment is compatible with previous default partition hash ranges assignment therefore there is no backward compatibility issues. The new mechanism makes finding transaction coordinator easy and straightforward. Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit a45162a)
Added test that verifies if new simplified transactional coordinator lookup logic is compatible with previous one. Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 4118290)
Removed tx_registry class as it is no longer used Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 5003e9c)
Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 20242bd)
Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit b4c8cd3)
Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 457aebb)
When waiting for topic to be created `controller_api` should include waiting for topic metadata. Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 9a23798)
Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 7bb5c56)
Several tests set configs directly with config::shard_local_config without cleaning them up after. This means that the next test that gets run in the same process may be affected by whatever a previous test had set. This introduces a new scoped wrapper around config::shard_local_config to track what properties may have been updated, so it may reset them upon call to destructor. (cherry picked from commit ed4d72d)
Uses the new scoped_config to reset updated configs to their defaults at the end of each test. This ensures no side effects across tests. (cherry picked from commit d15a801)
Signed-off-by: Michal Maslanka <michal@redpadna.com>
mmaslankaprv
force-pushed
the
v23.2.x-migration
branch
from
December 7, 2023 09:03
e7e75d3
to
40534ff
Compare
Michal Maslanka seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
ci failure: #15295 |
bharathv
approved these changes
Dec 7, 2023
the golang issue is independent from this PR: #15364 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of PR #14882
Backport of PR #13146
Backport of PR #11021
Fixes: #15137