Skip to content

Conversation

@juncevich
Copy link
Contributor

HDDS-11764. Fix initiating DocumentBuilderFactory performance problem.

Cache initiating DocumentBuilderFactory and NodeSchemaManager to ip

Link to Jira task: HDDS-11764

Patch tested only by performance tests.

@adoroszlai adoroszlai marked this pull request as draft November 20, 2024 20:09
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.

Thanks @juncevich for working on this. Please check CI run for failures: https://github.com/juncevich/ozone/actions/runs/11940547308

Comment on lines 62 to 70
NodeSchemaManager cachedInstance = cache.get(schemaFile);
if (cachedInstance == null) {
instance = new NodeSchemaManager();
instance.init(schemaFile);
cache.put(schemaFile, instance);
return instance;
} else {
return cachedInstance;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not thread-safe. Use cache.computeIfAbsent() if NodeSchemaManager.init() has no side-effects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will fix.

@juncevich juncevich requested a review from adoroszlai November 21, 2024 07:15
@adoroszlai
Copy link
Contributor

Looking at stack trace in the screenshot attached to HDDS-11764, I think this is fixed by #6434. OzoneManager.getClusterMap() no longer creates new NetworkTopologyManager.

@juncevich
Copy link
Contributor Author

#6434

Yep. It looks like you're right.

@juncevich
Copy link
Contributor Author

Will test and this PR close if the problem will solved.

@juncevich
Copy link
Contributor Author

We found a performance problem with the recording file's speed. Without this fix, it degraded by approximately 14 %. We need time to find the problem.

@juncevich juncevich closed this Dec 16, 2024
@juncevich juncevich deleted the HDSS-11764 branch December 16, 2024 12:24
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