Skip to content
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

Log session when session unpickling fails #34

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

kkoz
Copy link
Member

@kkoz kkoz commented Jun 10, 2024

Previously, to debug an "unpickling" error, we had to dig through Redis to find the session which had created the error. With these changes, exceptions thrown during the unpickling process are caught and the failing session is logged. We also added some logic to give more useful errors in the case where a BINGET requests a memoized item which is not present in the memo object.

@@ -154,9 +158,13 @@ private void deserializeConnector(Iterator<Op> opIterator) {
case "is_public":
isPublic = deserializeBooleanField(opIterator);
break;
default:
log.warn("Unexpected field name in connector: "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
} catch (Exception e) {
log.error("Exception while deserializing: {}", fieldName);
log.error("Pickled Session: " + b64Session);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

Also, I would assume we would rather want to surround the init() in the constructor with a try block and log this at ERROR level if an exception is thrown there, no?

@kkoz kkoz marked this pull request as ready for review June 12, 2024 19:12
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris-allan could you check the last commits address your requested changes? As we will likely cut a new patch release of omero-ms-core, this might be a good opportunity to include these changes so that we have additional logging next time the session unpickling fails.

@sbesson sbesson linked an issue Feb 12, 2025 that may be closed by this pull request
@chris-allan chris-allan merged commit abdd5d3 into glencoesoftware:master Feb 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected opcode for serverId: LONG_BINGET
3 participants