You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2021/12/20 23:18:06 UTC

[pinot] branch fix-reference-count-for-segments created (now e9745f1)

This is an automated email from the ASF dual-hosted git repository.

jlli pushed a change to branch fix-reference-count-for-segments
in repository https://gitbox.apache.org/repos/asf/pinot.git.


      at e9745f1  Move decode method before calling acquireSegment to avoid reference count leak

This branch includes the following new commits:

     new e9745f1  Move decode method before calling acquireSegment to avoid reference count leak

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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


[pinot] 01/01: Move decode method before calling acquireSegment to avoid reference count leak

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch fix-reference-count-for-segments
in repository https://gitbox.apache.org/repos/asf/pinot.git

commit e9745f10884835332bb237e3a407c9df228e3621
Author: Jack Li(Analytics Engineering) <jl...@jlli-mn1.linkedin.biz>
AuthorDate: Mon Dec 20 15:17:37 2021 -0800

    Move decode method before calling acquireSegment to avoid reference count leak
---
 .../pinot/server/api/resources/TablesResource.java       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java b/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
index d353da1..693cabc 100644
--- a/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
+++ b/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
@@ -259,6 +259,14 @@ public class TablesResource {
       @ApiParam(value = "Segment name", required = true) @PathParam("segmentName") String segmentName,
       @ApiParam(value = "Column name", allowMultiple = true) @QueryParam("columns") @DefaultValue("")
           List<String> columns) {
+    for (int i = 0; i < columns.size(); i++) {
+      try {
+        columns.set(i, URLDecoder.decode(columns.get(i), StandardCharsets.UTF_8.name()));
+      } catch (UnsupportedEncodingException e) {
+        throw new RuntimeException(e.getCause());
+      }
+    }
+
     TableDataManager tableDataManager = ServerResourceUtils.checkGetTableDataManager(_serverInstance, tableName);
     try {
       segmentName = URLDecoder.decode(segmentName, StandardCharsets.UTF_8.name());
@@ -271,14 +279,6 @@ public class TablesResource {
           Response.Status.NOT_FOUND);
     }
 
-    for (int i = 0; i < columns.size(); i++) {
-      try {
-        columns.set(i, URLDecoder.decode(columns.get(i), StandardCharsets.UTF_8.name()));
-      } catch (UnsupportedEncodingException e) {
-        throw new RuntimeException(e.getCause());
-      }
-    }
-
     try {
       return SegmentMetadataFetcher.getSegmentMetadata(segmentDataManager, columns);
     } catch (Exception e) {

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