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 safe logging arguments to StorageService #604

Open
wants to merge 1 commit into
base: palantir-cassandra-2.2.18
Choose a base branch
from

Conversation

andybradshaw
Copy link
Contributor

No description provided.

Copy link
Contributor

@rhuffy rhuffy left a comment

Choose a reason for hiding this comment

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

left some small nits, otherwise LGTM

Comment on lines +1122 to +1123
logger.warn("Some data streaming failed. Use nodetool to check bootstrap state and resume. For more, see `nodetool help bootstrap`. {}",
SafeArg.of("", SystemKeyspace.getBootstrapState()));
Copy link
Contributor

Choose a reason for hiding this comment

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

arg name here?

Comment on lines -3782 to +3810
logger.info("Combining new repair request with in-progress (identical) repair command #{}", cmd);
logger.info("Combining new repair request with in-progress (identical) repair command #{}", UnsafeArg.of("command", cmd));
Copy link
Contributor

Choose a reason for hiding this comment

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

cmd is an int, so this is probably safe, right?

InetAddress preferred = SystemKeyspace.getPreferredIP(address);
streamPlan.requestRanges(address, preferred, keyspace, workMap.get(address));
}

logger.debug("Keyspace {}: work map {}.", keyspace, workMap);
// This log line seems unnecessary given the above loop...
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe, but I do think in grafana it's easier to analyze a single log line instead of combining multiple, especially when multiple nodes are reporting the logs simultaneously

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.

2 participants