leventov commented on a change in pull request #8165: [Improvement] DataSegment 
intern improvement (reduce 60% memory consume on coordinator)
URL: https://github.com/apache/incubator-druid/pull/8165#discussion_r307832543
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/timeline/DataSegment.java
 ##########
 @@ -76,9 +76,22 @@
     @Inject(optional = true) @PruneLoadSpec boolean pruneLoadSpec = false;
   }
 
+  public static DataSegment intern(DataSegment dataSegment, boolean 
updateLoadSpec)
+  {
+    DataSegment result = DATA_SEGMENT_INTERNER.intern(dataSegment);
+    if (updateLoadSpec) {
+      result.dimensions = dataSegment.dimensions;
 
 Review comment:
   I think `DataSegment` shouldn't become mutable. However, it would be nice if 
you would solve this problem in this PR: #6358.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to