Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6739ffe

Browse files
committed
fix incidental recovery slot clean up logic broken few commits ago
1 parent 30c4916 commit 6739ffe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/state.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ MtmStateFill(MtmConfig *cfg)
148148

149149
LWLockAcquire(MtmStateLock, LW_EXCLUSIVE);
150150

151-
mtm_state->recovery_slot = cfg->backup_node_id;
151+
// XXX: that kind of dangerous. Move to mtm-monitor?
152+
if (cfg->backup_node_id != 0)
153+
mtm_state->recovery_slot = cfg->backup_node_id;
154+
152155
BIT_SET(mtm_state->connected_mask, cfg->my_node_id - 1);
153156

154157
/* re-create configured_mask */

0 commit comments

Comments
 (0)