Skip to content

Commit

Permalink
r/recovery_stm: log taking on demand snapshot at info level
Browse files Browse the repository at this point in the history
When on demand snapshot is taken it may be helpful to check the
difference between configured learner start offset and current leader
start offset.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed May 28, 2024
1 parent d8f01f3 commit 9a3178e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/v/raft/recovery_stm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "raft/raftgen_service.h"
#include "ssx/sformat.h"
#include "storage/snapshot.h"
#include "utils/human.h"

#include <seastar/core/condition-variable.hh>
#include <seastar/core/coroutine.hh>
Expand Down Expand Up @@ -454,9 +455,14 @@ ss::future<> recovery_stm::install_snapshot(required_snapshot_type s_type) {
ss::future<>
recovery_stm::take_on_demand_snapshot(model::offset last_included_offset) {
vlog(
_ctxlog.debug,
"creating on demand snapshot with last included offset: {}",
last_included_offset);
_ctxlog.info,
"creating on demand snapshot with last included offset: {}, current "
"leader start offset: {}. Total partition size on leader {}, expected to "
"transfer to learner: {}",
last_included_offset,
_ptr->start_offset(),
human::bytes(_ptr->log()->size_bytes()),
human::bytes(_ptr->log()->size_bytes_after_offset(last_included_offset)));

_inflight_snapshot_last_included_index = last_included_offset;
// if there is no stm_manager available for the raft group use empty
Expand Down

0 comments on commit 9a3178e

Please sign in to comment.