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

Add Logs for SessionHelper #12574

Merged
merged 7 commits into from
Oct 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ async function updateExistingSession(
// Allow session stickiness to be overridden by manually deleting a session's orderer/historian urls.
const sessionHasLocation: boolean =
!!existingSession.ordererUrl && !!existingSession.historianUrl && !!existingSession.deltaStreamUrl;
Lumberjack.info("Calculated isSessionSticky and sessionHasLocation", {
...lumberjackProperties,
isSessionSticky,
sessionHasLocation,
documentLastAccessTime: document.lastAccessTime,
sessionStickyCalculationTimestamp,
sessionStickinessDurationMs,
});
if (!isSessionSticky || !sessionHasLocation) {
// Allow session location to be moved.
if (
Expand All @@ -92,10 +100,6 @@ async function updateExistingSession(
// Reset logOffset, ordererUrl, and historianUrl when moving session location.
Lumberjack.info("Moving session", {
...lumberjackProperties,
tianzhu007 marked this conversation as resolved.
Show resolved Hide resolved
isSessionSticky,
documentLastAccessTime: document.lastAccessTime,
sessionStickyCalculationTimestamp,
sessionStickinessDurationMs,
// eslint-disable-next-line max-len
oldSessionLocation: { ordererUrl: existingSession.ordererUrl, historianUrl: existingSession.historianUrl, deltaStreamUrl: existingSession.deltaStreamUrl },
newSessionLocation: { ordererUrl, historianUrl, deltaStreamUrl },
Expand Down