GP-5788: Add an action to forcibly close all transactions for a target (in case of back-end misbehavior)

This commit is contained in:
Dan
2025-07-28 12:31:48 +00:00
parent c56d41a353
commit 1ad0a0f719
8 changed files with 127 additions and 14 deletions

View File

@@ -700,4 +700,15 @@ public interface Target {
* @return true if busy
*/
boolean isBusy();
/**
* Forcibly commit all of the back-ends transactions on this target's trace.
*
* <p>
* This is generally not a recommended course of action, except that sometimes the back-end
* crashes and fails to close a transaction. It should only be invoked by a relatively hidden
* menu option, and mediated by a warning of some sort. Closing a transaction prematurely, when
* the back-end actually <em>does</em> still need it may cause a host of other problems.
*/
void forciblyCloseTransactions();
}

View File

@@ -171,8 +171,19 @@ public interface TraceRmiConnection extends AutoCloseable {
/**
* Check if the given target has a transaction open
*
* @param target
* @param target the target
* @return true if busy
*/
boolean isBusy(Target target);
/**
* Forcibly commit all transactions this connection has on the given trace
*
* <p>
* This may cause undefined behavior in the back-end, especially if it still needs the
* transaction.
*
* @param target the the target
*/
void forciblyCloseTransactions(Target target);
}