Skip to content

Commit 74f5dd7

Browse files
committed
chore: commentary
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
1 parent ba2f90a commit 74f5dd7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

enterprise/coderd/prebuilds/reconcile.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,12 @@ func (c *StoreReconciler) Run(ctx context.Context) {
103103
c.running.Store(true)
104104

105105
// Publish provisioning jobs outside of database transactions.
106-
// PGPubsub tries to acquire a new connection on Publish. A connection is held while a database transaction is active,
107-
// so we can exhaust available connections.
106+
// A connection is held while a database transaction is active; PGPubsub also tries to acquire a new connection on
107+
// Publish, so we can exhaust available connections.
108+
//
109+
// A single worker dequeues from the channel, which should be sufficient.
110+
// If any messages are missed due to congestion or errors, provisionerdserver has a backup polling mechanism which
111+
// will periodically pick up any queued jobs (see poll(time.Duration) in coderd/provisionerdserver/acquirer.go).
108112
go func() {
109113
for {
110114
select {

0 commit comments

Comments
 (0)