Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
more debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Borderé committed Jun 29, 2023
1 parent 72c963b commit 6b9ce19
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ static int clientChangeConfiguration(
goto err_after_log_append;
}

tracef("set configuration_uncommitted_index to %llu", index);
r->configuration_uncommitted_index = index;

return 0;
Expand Down
1 change: 1 addition & 0 deletions src/membership.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ int membershipUncommittedChange(struct raft *r,

r->configuration = configuration;
r->configuration_uncommitted_index = index;
tracef("set configuration_uncommitted_index to %llu", index);

return 0;

Expand Down
2 changes: 2 additions & 0 deletions src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ static int triggerActualPromotion(struct raft *r)

r->leader_state.promotee_id = 0;
r->configuration_uncommitted_index = logLastIndex(r->log);
tracef("configuration_uncommitted_index is %llu", r->configuration_uncommitted_index);

return 0;

Expand Down Expand Up @@ -1019,6 +1020,7 @@ static int deleteConflictingEntries(struct raft *r,

/* Possibly discard uncommitted configuration changes. */
if (r->configuration_uncommitted_index >= entry_index) {
tracef("pre rollback: %llu >= %llu", r->configuration_uncommitted_index, entry_index);
rv = membershipRollback(r);
if (rv != 0) {
return rv;
Expand Down
1 change: 1 addition & 0 deletions src/start.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ static int restoreEntries(struct raft *r,
}
conf = entry;
conf_index = r->last_stored;
tracef("another configuration at index %llu", conf_index);
}
}

Expand Down

0 comments on commit 6b9ce19

Please sign in to comment.