You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/07/26 17:10:34 UTC

[GitHub] [incubator-druid] leventov commented on a change in pull request #8165: [Improvement] DataSegment intern improvement (reduce 60% memory consume on coordinator)

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org