mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-28 00:23:00 +00:00
storage: rename term -> last_log_term in TimelineMembershipSwitchResponse (#12481)
## Problem Names are not consistent between safekeeper migration RFC and the actual implementation. It's not used anywhere in production yet, so it's safe to rename. We don't need to worry about backward compatibility. - Follow up on https://github.com/neondatabase/neon/pull/12432 ## Summary of changes - rename term -> last_log_term in TimelineMembershipSwitchResponse - add missing fields to TimelineMembershipSwitchResponse in python
This commit is contained in:
@@ -2371,7 +2371,7 @@ pub fn make_router(
|
||||
named_request_span(
|
||||
r,
|
||||
handle_safekeeper_scheduling_policy,
|
||||
RequestName("v1_safekeeper_status"),
|
||||
RequestName("v1_safekeeper_scheduling_policy"),
|
||||
)
|
||||
})
|
||||
// Tenant Shard operations
|
||||
|
||||
@@ -914,13 +914,13 @@ impl Service {
|
||||
// so it isn't counted toward the quorum.
|
||||
if let Some(min_position) = min_position {
|
||||
if let Ok(ok_res) = &res {
|
||||
if (ok_res.term, ok_res.flush_lsn) < min_position {
|
||||
if (ok_res.last_log_term, ok_res.flush_lsn) < min_position {
|
||||
// Use Error::Timeout to make this error retriable.
|
||||
res = Err(mgmt_api::Error::Timeout(
|
||||
format!(
|
||||
"safekeeper {} returned position {:?} which is less than minimum required position {:?}",
|
||||
client.node_id_label(),
|
||||
(ok_res.term, ok_res.flush_lsn),
|
||||
(ok_res.last_log_term, ok_res.flush_lsn),
|
||||
min_position
|
||||
)
|
||||
));
|
||||
@@ -1216,7 +1216,7 @@ impl Service {
|
||||
|
||||
let mut sync_position = (INITIAL_TERM, Lsn::INVALID);
|
||||
for res in results.into_iter().flatten() {
|
||||
let sk_position = (res.term, res.flush_lsn);
|
||||
let sk_position = (res.last_log_term, res.flush_lsn);
|
||||
if sync_position < sk_position {
|
||||
sync_position = sk_position;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user