Skip to content

Commit e1192c7

Browse files
committed
Comment cleanup
1 parent 9a8e760 commit e1192c7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cmd/monitor/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ func handleDeadMemberMonitorTick(ctx context.Context, node *flypg.Node, seenAt m
157157
}
158158

159159
for _, standby := range standbys {
160-
// Wrap this in a function so connections are properly closed.
161160
sConn, err := node.RepMgr.NewRemoteConnection(ctx, standby.Hostname)
162161
if err != nil {
163162
// TODO - Verify the exception that's getting thrown.

internal/flycheck/pg.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,22 @@ func diskCapacityCheck(ctx context.Context, node *flypg.Node) (string, error) {
6767

6868
// Turn primary read-only
6969
if usedPercentage > diskCapacityPercentageThreshold {
70-
fmt.Println("Broadcasting readonly change to registered standbys")
71-
70+
// If the read-only lock has already been set, we can assume that we've already
71+
// broadcasted.
7272
if !flypg.ReadOnlyLockExists() {
73+
fmt.Println("Broadcasting readonly change to registered standbys")
7374
if err := flypg.BroadcastReadonlyChange(ctx, node, true); err != nil {
74-
fmt.Printf("errors with set readonly broadcast: %s\n", err)
75+
fmt.Printf("errors with enable readonly broadcast: %s\n", err)
7576
}
7677
}
7778

7879
return "", fmt.Errorf("%0.1f%% - readonly mode enabled, extend your volume to re-enable writes", usedPercentage)
7980
}
8081

81-
// Don't attempt to turn read/write if zombie lock exists.
82+
// Don't attempt to disable readonly if there's a zombie.lock
8283
if !flypg.ZombieLockExists() && flypg.ReadOnlyLockExists() {
8384
if err := flypg.BroadcastReadonlyChange(ctx, node, false); err != nil {
84-
fmt.Printf("errors with unset readonly broadcast: %s\n", err)
85+
fmt.Printf("errors with disable readonly broadcast: %s\n", err)
8586
}
8687
}
8788

0 commit comments

Comments
 (0)