Skip to content

Commit 38f57e8

Browse files
committed
BUG/MINOR: fs: wait until all files are written prior to transaction commit
1 parent 1b84fd9 commit 38f57e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controller/controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ func (c *HAProxyController) updateHAProxy() {
175175
logger.Error(handler.Update(c.store, c.haproxy, c.annotations))
176176
}
177177

178+
fs.Writer.WaitUntilWritesDone()
179+
178180
err = c.haproxy.APICommitTransaction()
179181
if err != nil {
180182
logger.Error("unable to Sync HAProxy configuration !!")
@@ -197,8 +199,6 @@ func (c *HAProxyController) updateHAProxy() {
197199
c.setToReady()
198200
}
199201

200-
fs.Writer.WaitUntilWritesDone()
201-
202202
if instance.NeedReload() {
203203
fs.RunDelayedFuncs()
204204
if err = c.haproxy.Service("reload"); err != nil {

0 commit comments

Comments
 (0)