-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abort HA Realization Logic After Timeout #800
base: main
Are you sure you want to change the base?
Commits on Oct 25, 2024
-
icingadb: Unify select cases for derived contexts
The main loop select cases for hactx.Done() and ctx.Done() were unified, as hactx is a derived ctx. A closed ctx case may be lost as the hactx case could have been chosen.
Configuration menu - View commit details
-
Copy full SHA for a587870 - Browse repository at this point
Copy the full SHA a587870View commit details -
HA: Increase log level for heartbeats from the future
Timing issues may be the root of future failures. Thus, it is important to be aware if the timing seems to be out of sync.
Configuration menu - View commit details
-
Copy full SHA for 3f69f98 - Browse repository at this point
Copy the full SHA 3f69f98View commit details -
HA: Deferred SQL Transaction Rollback
Each transaction is created within the retryable function, but this function may be exited prematurely before committing. A deferred rollback ensures that the transaction will be rolled back and cleaned up in this case, or will be a noop when performed after the commit.
Configuration menu - View commit details
-
Copy full SHA for f881920 - Browse repository at this point
Copy the full SHA f881920View commit details -
HA: Insert environment within retryable function
The HA.insertEnvironment() method was inlined into the retryable function to use the deadlined context. Otherwise, this might block afterwards, as it was used within HA.realize(), but without the passed context.
Configuration menu - View commit details
-
Copy full SHA for dd0ca8f - Browse repository at this point
Copy the full SHA dd0ca8fView commit details -
HA/Heartbeat: Use last message's timestamp
Since the retryable HA function may be executed a few times before succeeding, the inserted heartbeat value will be directly outdated. The heartbeat logic was slightly altered to always use the latest heartbeat time value.
Configuration menu - View commit details
-
Copy full SHA for c2d8bd6 - Browse repository at this point
Copy the full SHA c2d8bd6View commit details -
HA: Abort Transaction Commit after Timeout
A strange HA behavior was reported in #787, resulting in both instances being active. The logs contained an entry of the previous active instance exiting the HA.realize() method successfully after 1m9s. This, however, should not be possible as the method's context is deadlined to a minute after the heartbeat was received. However, as it turns out, executing COMMIT on a database transaction is not bound to the transaction's context, allowing to survive longer. To mitigate this, another context watch was introduced. Doing so allows directly handing over, while the other instance can now take over due to the expired heartbeat in the database.
Configuration menu - View commit details
-
Copy full SHA for 8b95d25 - Browse repository at this point
Copy the full SHA 8b95d25View commit details