[
https://issues.apache.org/jira/browse/HBASE-13332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14380979#comment-14380979
]
Srikanth Srungarapu commented on HBASE-13332:
---------------------------------------------
bq. While reviewing the patch for backports I've found some cases where Table
and Connection are substituted for use of HTable within doAs, and some cases
where not. Why not all cases? I'm looking at TestVisibilityLabelsWithACL
specifically.
When I'm working on the fix, I made sure that all Table instances inside
PriviligedAction objects must occur through Connection. In
TestVisibilityLabelsWhitACL, when I grepped for HTable, it is being returned as
part of createTableAndWriteDataWithLabels, which is not embedded in
PriviligedAction object. May be, I'm missing something.
bq. Also looks like you stopped making replacements of HTable and try-finally
with Table+Connection in try-with-resources here.
In case of acl related tests, already the try with resources construct got
introduced before HBASE-13294. So, for preserving uniformity , I brought all of
them into the same format. In case of vc tests, looks like they were using
standard open and close format. So, I honored that construct. But, if you are
okay, I can convert all of them to try with resources format.
bq. Some tests also leak unclosed HTable references. This isn't the fault of
the patch but why not clean up while in there (and get rid of HTable in the
process)?
Sounds good. will do that.
bq. There's no 0.98 patch, did you want to try and resolve the same issues in
that branch too?
0.98 is safe, as no connection objects are being used over there.
bq. We can proceed with just the commit of the master patch as is
Your call. I can create a follow-on jira, for cleaning the leaks and integrate
try-with-resources or I can add them to this patch.
> Fix the usage of doAs/runAs in Visibility Controller tests.
> -----------------------------------------------------------
>
> Key: HBASE-13332
> URL: https://issues.apache.org/jira/browse/HBASE-13332
> Project: HBase
> Issue Type: Sub-task
> Reporter: Srikanth Srungarapu
> Assignee: Srikanth Srungarapu
> Fix For: 2.0.0, 1.0.1, 1.1.0, 0.98.12
>
> Attachments: HBASE-13332.patch, HBASE-13332.patch
>
>
> The "doAs" bug is also affecting VC related tests too.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)