You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "juncevich (via GitHub)" <gi...@apache.org> on 2024/11/20 19:45:33 UTC
[PR] HDDS-11764. Fix initiating DocumentBuilderFactory performance problem. [ozone]
juncevich opened a new pull request, #7462:
URL: https://github.com/apache/ozone/pull/7462
HDDS-11764. Fix initiating DocumentBuilderFactory performance problem.
Cache initiating DocumentBuilderFactory and NodeSchemaManager to ip
[Link to Jira task: HDDS-11764](https://issues.apache.org/jira/browse/HDDS-11764)
Patch tested only by performance tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11764. Fix initiating DocumentBuilderFactory performance problem. [ozone]
Posted by "juncevich (via GitHub)" <gi...@apache.org>.
juncevich commented on code in PR #7462:
URL: https://github.com/apache/ozone/pull/7462#discussion_r1850930296
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NodeSchemaManager.java:
##########
@@ -55,6 +58,18 @@ public static NodeSchemaManager getInstance() {
return instance;
}
+ public static NodeSchemaManager getInitiatedInstance(String schemaFile) {
+ NodeSchemaManager cachedInstance = cache.get(schemaFile);
+ if (cachedInstance == null) {
+ instance = new NodeSchemaManager();
+ instance.init(schemaFile);
+ cache.put(schemaFile, instance);
+ return instance;
+ } else {
+ return cachedInstance;
+ }
Review Comment:
Thanks, will fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11764. Fix initiating DocumentBuilderFactory performance problem. [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #7462:
URL: https://github.com/apache/ozone/pull/7462#discussion_r1850922163
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NodeSchemaManager.java:
##########
@@ -55,6 +58,18 @@ public static NodeSchemaManager getInstance() {
return instance;
}
+ public static NodeSchemaManager getInitiatedInstance(String schemaFile) {
+ NodeSchemaManager cachedInstance = cache.get(schemaFile);
+ if (cachedInstance == null) {
+ instance = new NodeSchemaManager();
+ instance.init(schemaFile);
+ cache.put(schemaFile, instance);
+ return instance;
+ } else {
+ return cachedInstance;
+ }
Review Comment:
This is not thread-safe. Use `cache.computeIfAbsent()` if `NodeSchemaManager.init()` has no side-effects.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11764. Fix initiating DocumentBuilderFactory performance problem. [ozone]
Posted by "juncevich (via GitHub)" <gi...@apache.org>.
juncevich commented on PR #7462:
URL: https://github.com/apache/ozone/pull/7462#issuecomment-2504871313
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11764. Fix initiating DocumentBuilderFactory performance problem. [ozone]
Posted by "juncevich (via GitHub)" <gi...@apache.org>.
juncevich closed pull request #7462: HDDS-11764. Fix initiating DocumentBuilderFactory performance problem.
URL: https://github.com/apache/ozone/pull/7462
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11764. Fix initiating DocumentBuilderFactory performance problem. [ozone]
Posted by "juncevich (via GitHub)" <gi...@apache.org>.
juncevich commented on PR #7462:
URL: https://github.com/apache/ozone/pull/7462#issuecomment-2490297813
> #6434
Yep. It looks like you're right.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11764. Fix initiating DocumentBuilderFactory performance problem. [ozone]
Posted by "juncevich (via GitHub)" <gi...@apache.org>.
juncevich commented on PR #7462:
URL: https://github.com/apache/ozone/pull/7462#issuecomment-2490354764
Will test and this PR close if the problem will solved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11764. Fix initiating DocumentBuilderFactory performance problem. [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7462:
URL: https://github.com/apache/ozone/pull/7462#issuecomment-2490254731
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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org