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 more logging for client and cache #656

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

linzhou-db
Copy link
Collaborator

Add more logging for client and cache for better debug ability.

@@ -502,6 +503,8 @@ class DeltaSharingRestClient(
target = target, data = request, setIncludeEndStreamAction = endStreamActionEnabled
)
val (filteredLines, _) = maybeExtractEndStreamAction(response.lines)
logInfo(s"Took ${System.currentTimeMillis() - start} ms to query ${filteredLines.size} " +
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the goal is "better debug ability" rather than normal event logging, should these be on debug level?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@yinouya-db I'm not sure how to enable debug level logs in DBR, and I wonder we are only able to obtain logs after the enablement so that the logs for the query that's hitting an issue is not available?

Copy link
Collaborator

Choose a reason for hiding this comment

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

These stats seem like general information about a query execution. It would be nice to have them in the log.

The debug level would be a lengthy process though. We need to turn on debug, run repro or ask customer to do it, then check log again.

@@ -103,7 +103,7 @@ class CachedTableManager(
cache.remove(tablePath, cachedTable)
} else if (cachedTable.expiration - System.currentTimeMillis() < refreshThresholdMs) {
logInfo(s"Updating pre signed urls for $tablePath (expiration time: " +
s"${new java.util.Date(cachedTable.expiration)})")
s"${new java.util.Date(cachedTable.expiration)}), token:${cachedTable.refreshToken}")
Copy link
Collaborator

@littlegrasscao littlegrasscao Mar 4, 2025

Choose a reason for hiding this comment

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

Is refreshToken sensitive or it is known to recipient in memory/disk? Since you can print it out here, I guess it already known to recipient.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, it's an encrypted token and yes it's known to the recipient

@linzhou-db linzhou-db merged commit abad623 into delta-io:main Mar 5, 2025
0 of 5 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.

3 participants