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

HDDS-2461. Logging by ChunkUtils is misleading #144

Merged
merged 4 commits into from Nov 16, 2019

Conversation

elek
Copy link
Member

@elek elek commented Nov 12, 2019

What changes were proposed in this pull request?

During a k8s based test I found a lot of log message like:

2019-11-12 14:27:13 WARN  ChunkManagerImpl:209 - Duplicate write chunk request. Chunk overwrite without explicit request. ChunkInfo{chunkName='A9UrLxiEUN_testdata_chunk_4465025, offset=0, len=1024} 

I was very surprised as at ChunkManagerImpl:209 there was no related lines.

It turned out that it's logged by ChunkUtils but it's used the logger of ChunkManagerImpl.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-2461

How was this patch tested?

I deployed a new version from Ozone to the kubernetes cluster. But I also added a new test method TestChunkUtil to have at least one unit test method which uses the logger.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

WBMT (was bothering me, too) :)

LGTM, with one question.

Comment on lines -45 to -46
private static final Logger LOG = LoggerFactory.getLogger(
ChunkManagerDummyImpl.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I didn't notice this one earlier: we should keep this, since writeChunk uses it. (If removed it will use the one inherited from ChunkManagerImpl, resulting in wrong class name in log message.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, thanks. And the LOG should be private in ChunkManagerImpl to avoid such mistakes.

Copy link
Contributor

@bharatviswa504 bharatviswa504 left a comment

Choose a reason for hiding this comment

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

+1 LGTM.

@bharatviswa504 bharatviswa504 merged commit b01c7c9 into apache:master Nov 16, 2019
@bharatviswa504
Copy link
Contributor

Thank You @elek for the contribution and @adoroszlai for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants