-
Notifications
You must be signed in to change notification settings - Fork 597
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
rm stm state cleanup #18277
rm stm state cleanup #18277
Conversation
/dt |
new failures in https://buildkite.com/redpanda/redpanda/builds/48762#018f50fd-d113-4dd7-8ff3-f4ce242ba3b7:
new failures in https://buildkite.com/redpanda/redpanda/builds/48762#018f50fd-d115-4dd2-8caf-73486656d256:
new failures in https://buildkite.com/redpanda/redpanda/builds/48762#018f50fd-d10f-4469-a349-bb63573fb6ef:
new failures in https://buildkite.com/redpanda/redpanda/builds/48762#018f5105-93e0-4313-ac3e-84f231967828:
new failures in https://buildkite.com/redpanda/redpanda/builds/48762#018f5105-93db-4385-b29f-250fa99d2215:
new failures in https://buildkite.com/redpanda/redpanda/builds/48762#018f5105-93de-4c27-bc31-6b015249222d:
new failures in https://buildkite.com/redpanda/redpanda/builds/49048#018f7458-6b5a-4989-9551-f49a77ada713:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/48762#018f50fd-d115-4dd2-8caf-73486656d256 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/48902#018f5ee9-4f9c-4c64-82c1-fb531c0f71ac ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/48908#018f5fbf-04fa-46ef-b2bc-4c8ce13a0daa ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/49048#018f7458-6b61-46a3-a052-36a386140624 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/49048#018f7458-6b5f-49ce-a558-faa18ac402a0 |
efe0525
to
dd9a388
Compare
/dt |
src/v/features/feature_table.h
Outdated
@@ -99,7 +99,8 @@ inline const std::unordered_set<std::string_view> retired_features = { | |||
"mtls_authentication", | |||
"rm_stm_kafka_cache", | |||
"transaction_ga", | |||
}; | |||
"idempotency_v2", | |||
"transaction_partitioning"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do you make sure the feature flag is not in use anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://redpandadata.atlassian.net/wiki/spaces/CORE/pages/170491930/Features+Cluster+Logical+Versioning is relevant. Once the cluster is fully upgraded, the feature is always true and this coupled with no rolling back requirement across minors guarantees it is always true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so how do you know all clusters are upgraded so that the feature is always true on all of them?
model::tx_seq tx_seq, | ||
std::chrono::milliseconds transaction_timeout_ms, | ||
model::partition_id tm) { | ||
if (is_transaction_partitioning()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like the last use of function is_transaction_partitioning
, should we remove it?
|
||
return std::move(builder).build(); | ||
} | ||
|
||
SEASTAR_THREAD_TEST_CASE(fence_batch_compatibility) { | ||
vlog(logger.info, "Test fence_batch_v1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we still need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can still read old fence batch versions in the log after the upgrade. (eg: if old data is not truncated).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an extra commit on top (that was supposed to come in the next PR) since it is mechanical logging change, so thought it'd make sense to lump with this one.
|
||
return std::move(builder).build(); | ||
} | ||
|
||
SEASTAR_THREAD_TEST_CASE(fence_batch_compatibility) { | ||
vlog(logger.info, "Test fence_batch_v1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can still read old fence batch versions in the log after the upgrade. (eg: if old data is not truncated).
src/v/features/feature_table.h
Outdated
@@ -99,7 +99,8 @@ inline const std::unordered_set<std::string_view> retired_features = { | |||
"mtls_authentication", | |||
"rm_stm_kafka_cache", | |||
"transaction_ga", | |||
}; | |||
"idempotency_v2", | |||
"transaction_partitioning"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://redpandadata.atlassian.net/wiki/spaces/CORE/pages/170491930/Features+Cluster+Logical+Versioning is relevant. Once the cluster is fully upgraded, the feature is always true and this coupled with no rolling back requirement across minors guarantees it is always true.
These are always true by default going forward.
dd9a388
to
8f04fd1
Compare
snapshot version=5 is the active version since 23.3.x, Retiring code related to snapshot version=3.
Next change consolidates more types in this header
consolidate under cluster::tx so we donot polluter top level ns.
Break the monolith of rm_stm further and move unnecessarly logic out of it.
8f04fd1
to
63bc2c0
Compare
} | ||
}; | ||
|
||
struct transaction_info { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: now that this is in tx namespace, the name transaction_info
has additional gravity :) Can we modify the name to hint that this is about a single partition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, this is changing in the next PR, trying to cleanup a lot of stuff in this area.
Main changes in this PR
cluster::tx
namespace fromcluster
The change is purely mechanical. This preps the code for the next PR that moves even more state out of the state machine. The end goal is to make the state machine lean and easy to reason about.
Backports Required
Release Notes