Skip to content

PHOENIX-6129 : Optimize tableExists() call while retrieving correct MUTEX table - #920

Merged
ChinmaySKulkarni merged 8 commits into
apache:masterfrom
virajjasani:PHOENIX-6129-master
Oct 26, 2020
Merged

PHOENIX-6129 : Optimize tableExists() call while retrieving correct MUTEX table#920
ChinmaySKulkarni merged 8 commits into
apache:masterfrom
virajjasani:PHOENIX-6129-master

Conversation

@virajjasani

Copy link
Copy Markdown
Contributor

No description provided.

@virajjasani

Copy link
Copy Markdown
ContributorAuthor

Since it is not allowed to mutate SYSTEM tables, providing corresponding IT test seems difficult.

SchemaUtil.getTableKey(tenantId, schemaName, tableName);
// at this point the system mutex table should have been created or
// an exception thrown
byte[] sysMutexPhysicalTableNameBytes = getSysMutexPhysicalTableNameBytes();

@richardantalrichardantalOct 14, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

byte[] sysMutexPhysicalTableNameBytes = getSysMutexPhysicalTableNameBytes();

If I understand correctly what @ChinmaySKulkarni described in the ticket, this call will still result to an admin.tableExists call to check the existance of SYSTEM.MUTEX/SYSTEM:MUTEX and you didn't changed that.

@richardantalrichardantalOct 14, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try (Table sysMutexTable = getTable(sysMutexPhysicalTableNameBytes)) {

Instead We could try the Table sysMutexTable =getTable() call with one of them and catch HBase TableNotFoundException, in that case try with the other one.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If getSysMutexPhysicalTableNameBytes() start throwing TableNotFoundException, then at this point the Exception would be thrown and caught, so we would not go ahead with next getTable() call.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChinmaySKulkarniChinmaySKulkarniOct 15, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@virajjasani I think there is some confusion here. The aim of this Jira is to reduce the HBase calls to get the table. Currently, the call to writeMutexCell() calls getSysMutexPhysicalTableNameBytes() which does 1 or 2 HBase admin calls (tableExists()) and then we still do a getTable() call here.
The same happens for deleteMutexCell().

Instead of calling getSysMutexPhysicalTableNameBytes(), we can do 1 getTable() call with SYSTEM.MUTEX and if that throws a TNFE, try again with SYSTEM:MUTEX thus eliminating the tableExists() calls.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad for this misunderstanding. Addressed concerns, updated the PR.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec10m 18sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall49m 54smaster passed
+1 💚compile1m 15smaster passed
+1 💚checkstyle1m 17smaster passed
+1 💚javadoc0m 57smaster passed
+0 🆗spotbugs3m 23sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall41m 32sthe patch passed
+1 💚compile0m 59sthe patch passed
+1 💚javac0m 59sthe patch passed
-1 ❌checkstyle1m 8sphoenix-core: The patch generated 39 new + 2201 unchanged - 41 fixed = 2240 total (was 2242)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 45sthe patch passed
+1 💚spotbugs3m 20sthe patch passed
_ Other Tests _
-1 ❌unit166m 17sphoenix-core in the patch failed.
+1 💚asflicense0m 22sThe patch does not generate ASF License warnings.
283m 57s
ReasonTests
Failed junit testsphoenix.end2end.OrphanViewToolIT
phoenix.end2end.ConcurrentMutationsExtendedIT
phoenix.end2end.ViewMetadataIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#920
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 747e6da3f8ca 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 5b2eeb6
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/1/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/1/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/1/testReport/
Max. process+thread count6223 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/1/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani

virajjasani commented Oct 15, 2020

Copy link
Copy Markdown
ContributorAuthor

Test failures don't seem relevant, tried locally, all passed. Fixed checkstyle issues relevant to this PR.
Could you please take a look @yanxinyi ?

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 19sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall47m 16smaster passed
+1 💚compile1m 4smaster passed
+1 💚checkstyle1m 3smaster passed
+1 💚javadoc0m 51smaster passed
+0 🆗spotbugs3m 37sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall43m 2sthe patch passed
+1 💚compile0m 57sthe patch passed
+1 💚javac0m 57sthe patch passed
-1 ❌checkstyle1m 6sphoenix-core: The patch generated 4 new + 2230 unchanged - 12 fixed = 2234 total (was 2242)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 46sthe patch passed
+1 💚spotbugs3m 18sthe patch passed
_ Other Tests _
-1 ❌unit156m 12sphoenix-core in the patch failed.
+1 💚asflicense0m 21sThe patch does not generate ASF License warnings.
263m 22s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#920
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux fe9ca6f1804b 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / fe7c46c
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/2/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/2/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/2/testReport/
Max. process+thread count6070 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/2/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec2m 43sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
-1 ❌mvninstall45m 37sroot in master failed.
+1 💚compile1m 3smaster passed
+1 💚checkstyle1m 4smaster passed
+1 💚javadoc0m 49smaster passed
+0 🆗spotbugs3m 16sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
-1 ❌mvninstall42m 40sroot in the patch failed.
+1 💚compile1m 10sthe patch passed
+1 💚javac1m 10sthe patch passed
-1 ❌checkstyle1m 10sphoenix-core: The patch generated 31 new + 2192 unchanged - 50 fixed = 2223 total (was 2242)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 58sthe patch passed
+1 💚spotbugs4m 2sphoenix-core generated 0 new + 972 unchanged - 1 fixed = 972 total (was 973)
_ Other Tests _
-1 ❌unit155m 13sphoenix-core in the patch failed.
+1 💚asflicense0m 22sThe patch does not generate ASF License warnings.
262m 36s
ReasonTests
Failed junit testsphoenix.end2end.SystemTablesCreationOnConnectionIT
phoenix.end2end.MigrateSystemTablesToSystemNamespaceIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#920
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux eb4521000838 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 628fa0d
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/3/artifact/yetus-general-check/output/branch-mvninstall-root.txt
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/3/artifact/yetus-general-check/output/patch-mvninstall-root.txt
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/3/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/3/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/3/testReport/
Max. process+thread count6207 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/3/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani

Copy link
Copy Markdown
ContributorAuthor

@ChinmaySKulkarni IMHO we can not live without tableExists() call because Connection.getTable() has no guarantee that it will throw TableNotFoundException if table doesn't exist. What happens during namespace upgrade is that even if SYSTEM.MUTEX has been deleted (removed entry from meta), Connection.getTable() still returns us an instance of Table, however, we can't perform actions on it.

Admin.tableExists is the only thread safe way to identify if table already exists:

 /**
* @param tableName Table to check.
* @return <code>true</code> if table exists already.
* @throws IOException if a remote or network exception occurs
*/
boolean tableExists(TableName tableName) throws IOException;

&

 /**
* Retrieve a Table implementation for accessing a table.
* The returned Table is not thread safe, a new instance should be created for each using thread.
* This is a lightweight operation, pooling or caching of the returned Table
* is neither required nor desired.
* <p>
* The caller is responsible for calling {@link Table#close()} on the returned
* table instance.
* <p>
* Since 0.98.1 this method no longer checks table existence. An exception
* will be thrown if the table does not exist only when the first operation is
* attempted.
* @param tableName the name of the table
* @return a Table to use for interactions with this table
*/
default Table getTable(TableName tableName) throws IOException {
return getTable(tableName, null);
}

I checked implementation also, and getTable() internally uses getTableBuilder() which just provides a builder instance for just creating Table object to access actual table, but there is no guarantee that a table exists while accessing it. Only existsTable() goes to meta table and checks for the existing entry of Table.

We can do one improvement though, we can utilize same connection to perform both: tableExists() and getTable().
If we don't have tableExists(), test cases MigrateSystemTablesToSystemNamespaceIT are guaranteed to fail.
Updating the PR accordingly.

@virajjasanivirajjasani changed the title PHOENIX-6129 : Avoid redundant Admin API call in the absence of SYSTEM.MUTEX tablePHOENIX-6129 : Use same connection for tableExists() and getTable() for MUTEX tableOct 16, 2020
@virajjasanivirajjasani changed the title PHOENIX-6129 : Use same connection for tableExists() and getTable() for MUTEX tablePHOENIX-6129 : Use same connection for tableExists() and getTable() in same method to retrieve correct MUTEX tableOct 16, 2020
@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 1sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 1sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
-1 ❌mvninstall46m 12sroot in master failed.
+1 💚compile1m 3smaster passed
+1 💚checkstyle1m 6smaster passed
+1 💚javadoc0m 48smaster passed
+0 🆗spotbugs3m 7sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
-1 ❌mvninstall42m 31sroot in the patch failed.
+1 💚compile0m 58sthe patch passed
+1 💚javac0m 58sthe patch passed
-1 ❌checkstyle1m 7sphoenix-core: The patch generated 2 new + 2221 unchanged - 21 fixed = 2223 total (was 2242)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 46sthe patch passed
+1 💚spotbugs3m 20sphoenix-core generated 0 new + 972 unchanged - 1 fixed = 972 total (was 973)
_ Other Tests _
-1 ❌unit150m 24sphoenix-core in the patch failed.
+1 💚asflicense0m 21sThe patch does not generate ASF License warnings.
255m 8s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#920
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 88e6e2e470a4 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 628fa0d
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/4/artifact/yetus-general-check/output/branch-mvninstall-root.txt
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/4/artifact/yetus-general-check/output/patch-mvninstall-root.txt
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/4/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/4/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/4/testReport/
Max. process+thread count6092 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/4/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 59sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
-1 ❌mvninstall44m 54sroot in master failed.
+1 💚compile1m 1smaster passed
+1 💚checkstyle1m 7smaster passed
+1 💚javadoc0m 47smaster passed
+0 🆗spotbugs3m 9sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
-1 ❌mvninstall41m 48sroot in the patch failed.
+1 💚compile0m 55sthe patch passed
+1 💚javac0m 55sthe patch passed
-1 ❌checkstyle1m 7sphoenix-core: The patch generated 2 new + 2221 unchanged - 21 fixed = 2223 total (was 2242)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 46sthe patch passed
+1 💚spotbugs3m 16sphoenix-core generated 0 new + 972 unchanged - 1 fixed = 972 total (was 973)
_ Other Tests _
-1 ❌unit154m 15sphoenix-core in the patch failed.
+1 💚asflicense0m 21sThe patch does not generate ASF License warnings.
256m 51s
ReasonTests
Failed junit testsphoenix.end2end.OrphanViewToolIT
phoenix.end2end.index.ViewIndexIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/5/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#920
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 8d5b1a70eb70 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 628fa0d
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/5/artifact/yetus-general-check/output/branch-mvninstall-root.txt
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/5/artifact/yetus-general-check/output/patch-mvninstall-root.txt
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/5/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/5/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/5/testReport/
Max. process+thread count6183 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/5/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@virajjasanivirajjasani changed the title PHOENIX-6129 : Use same connection for tableExists() and getTable() in same method to retrieve correct MUTEX tablePHOENIX-6129 : Optimize tableExists() call while retrieving correct MUTEX tableOct 20, 2020
@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec5m 45sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall14m 44smaster passed
+1 💚compile1m 2smaster passed
+1 💚checkstyle1m 6smaster passed
+1 💚javadoc0m 48smaster passed
+0 🆗spotbugs3m 9sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 4sthe patch passed
+1 💚compile0m 57sthe patch passed
+1 💚javac0m 57sthe patch passed
-1 ❌checkstyle1m 8sphoenix-core: The patch generated 31 new + 2191 unchanged - 50 fixed = 2222 total (was 2241)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 47sthe patch passed
+1 💚spotbugs3m 19sphoenix-core generated 0 new + 972 unchanged - 1 fixed = 972 total (was 973)
_ Other Tests _
-1 ❌unit164m 43sphoenix-core in the patch failed.
+1 💚asflicense0m 24sThe patch does not generate ASF License warnings.
209m 18s
ReasonTests
Failed junit testsphoenix.end2end.TableSnapshotReadsMapReduceIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/6/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#920
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 8835fa318632 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 4703e46
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/6/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/6/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/6/testReport/
Max. process+thread count6239 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/6/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ChinmaySKulkarniChinmaySKulkarni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments. One generic question regarding your finding:

Connection.getTable() has no guarantee that it will throw TableNotFoundException if table doesn't exist.

CQSI.getTable() depends on HBaseFactoryProvider.getHTableFactory().getTable() which internally also uses connection.getTable(). As you can see from the CQSI.getTable() code, it tries to catch TableNotFoundException and probably expects one to be thrown if the table doesn't exist. As per your findings however, this is not guaranteed. This is a problem right? Do we need a separate Jira for this (if yes, can you please open one and mention your findings there)

} else if (admin.tableExists(TableName.valueOf(
SchemaUtil.getPhysicalTableName(SYSTEM_MUTEX_NAME, props).getName()))) {
sysMutexPhysicalTableNameBytes = SchemaUtil.getPhysicalTableName(SYSTEM_MUTEX_NAME, props).getName();
private Table getSysMutexTable() throws SQLException, IOException {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a unit test for this new method.

@ChinmaySKulkarni

Copy link
Copy Markdown
Contributor

@virajjasani please also make the commit message the same as the Jira (or update the Jira if you think this is more appropriate).

@virajjasani

Copy link
Copy Markdown
ContributorAuthor

@ChinmaySKulkarni I have addressed your comments, updated Jira message and created Jira PHOENIX-6203 for TNFE issue.
Could you please take a look?

Thanks for the review!

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 36sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall15m 51smaster passed
+1 💚compile1m 11smaster passed
+1 💚checkstyle1m 17smaster passed
+1 💚javadoc0m 55smaster passed
+0 🆗spotbugs3m 35sphoenix-core in master has 970 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 53sthe patch passed
+1 💚compile1m 6sthe patch passed
+1 💚javac1m 6sthe patch passed
-1 ❌checkstyle1m 18sphoenix-core: The patch generated 32 new + 2194 unchanged - 50 fixed = 2226 total (was 2244)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 53sthe patch passed
+1 💚spotbugs4m 17sphoenix-core generated 0 new + 969 unchanged - 1 fixed = 969 total (was 970)
_ Other Tests _
-1 ❌unit111m 28sphoenix-core in the patch failed.
+1 💚asflicense0m 30sThe patch does not generate ASF License warnings.
155m 33s
ReasonTests
Failed junit testsphoenix.end2end.TableSnapshotReadsMapReduceIT
phoenix.end2end.index.LocalImmutableNonTxIndexIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/7/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#920
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 7845ebd69e68 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 8c81131
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/7/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/7/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/7/testReport/
Max. process+thread count6514 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/7/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec2m 0sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall15m 15smaster passed
+1 💚compile1m 7smaster passed
+1 💚checkstyle1m 9smaster passed
+1 💚javadoc0m 51smaster passed
+0 🆗spotbugs3m 20sphoenix-core in master has 970 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall11m 0sthe patch passed
+1 💚compile1m 3sthe patch passed
+1 💚javac1m 3sthe patch passed
-1 ❌checkstyle1m 9sphoenix-core: The patch generated 3 new + 2223 unchanged - 21 fixed = 2226 total (was 2244)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 50sthe patch passed
+1 💚spotbugs3m 35sphoenix-core generated 0 new + 969 unchanged - 1 fixed = 969 total (was 970)
_ Other Tests _
-1 ❌unit152m 0sphoenix-core in the patch failed.
+1 💚asflicense0m 22sThe patch does not generate ASF License warnings.
196m 10s
ReasonTests
Failed junit testsphoenix.end2end.OrphanViewToolIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/8/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#920
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 962ce30e7af0 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 8c81131
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/8/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/8/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/8/testReport/
Max. process+thread count6202 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-920/8/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani

Copy link
Copy Markdown
ContributorAuthor

@ChinmaySKulkarni please take a look when you get time. Failed tests are not relevant.

@ChinmaySKulkarniChinmaySKulkarni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Thanks for fixing this @virajjasani !

@ChinmaySKulkarni
ChinmaySKulkarni merged commit b9fb461 into apache:masterOct 26, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@virajjasani@stoty@ChinmaySKulkarni@richardantal