Jira (PDB-4796) Fix race with sync cmd post when using cmd broadcast

6 views
Skip to first unread message

Zachary Kent (Jira)

unread,
Jul 2, 2020, 12:44:03 PM7/2/20
to puppe...@googlegroups.com
Zachary Kent created an issue
 
PuppetDB / Bug PDB-4796
Fix race with sync cmd post when using cmd broadcast
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/07/02 9:43 AM
Priority: Normal Normal
Reporter: Zachary Kent

In cmd broadcast mode blocking command submission (activated by setting the "secondsToWaitForCompletion" query param) has a race condition. The first submission which is completed to a PG backend will call the callback that the client is waiting on and return a result based that submission alone. If one of the submissions happens to fail before any can succeed we will return a 503 to the client even though the command may eventually be stored successfully in one of the PG instances.

 

In cmd broadcast mode we treat a cmd as successfully submitted if it makes it to at least one PG backend. We should move the callback handling a level up from command.clj/attempt-exec-command so that the callback is called when the first PG submission is successful or if all attempted submissions have failed. 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Zachary Kent (Jira)

unread,
Jul 2, 2020, 12:46:03 PM7/2/20
to puppe...@googlegroups.com
Zachary Kent updated an issue
Change By: Zachary Kent
Epic Link: PDB-4653
Team: HA

Zachary Kent (Jira)

unread,
Jul 2, 2020, 12:46:04 PM7/2/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages