Jira (PDB-5515) Rework sync timeouts to accomodate jdbc ignoring interrupts

0 views
Skip to first unread message

Rob Browning (Jira)

unread,
Aug 9, 2022, 11:57:18 AM8/9/22
to puppe...@googlegroups.com
Rob Browning updated an issue
 
PuppetDB / Bug PDB-5515
Rework sync timeouts to accomodate jdbc ignoring interrupts
Change By: Rob Browning
Summary: Rework sync timeouts to handle accomodate jdbc ignoring interrupts
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Rob Browning (Jira)

unread,
Aug 9, 2022, 12:14:01 PM8/9/22
to puppe...@googlegroups.com
Rob Browning updated an issue
The recent sync changes to avoid blocking forever depend on thread interrupts which it turns out jdbc doesn't always respect.  Rework the timeouts to avoid depending on interrupts.

Recommend the chapter in the "train book" (Java Concurrency in Practice) on "Cancellation and Shutdown" for background, for anyone not already familiar with the expectations -- briefly, thread interruption is cooperative, and it turns out the jdbc driver (perhaps intentionally) doesn't cooperate.

The current plan is to adjust the pull-records-from-remote code to replace interruption with (diminishing) in-transaction timeouts in all the relevant transactions (remote summary query, batch transfer process, etc.).  Ideally, the timeout should be based on the entity-ttl, and should be reduced after each command to respect the overall ttl as the sync process proceeds.

Micah Wilson (Jira)

unread,
Nov 2, 2022, 3:15:02 PM11/2/22
to puppe...@googlegroups.com
Micah Wilson updated an issue
Change By: Micah Wilson
Sprint: Dumpling Ready to Groom
Reply all
Reply to author
Forward
0 new messages