[
https://issues.apache.org/jira/browse/PHOENIX-6082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17239169#comment-17239169
]
ASF GitHub Bot commented on PHOENIX-6082:
-----------------------------------------
virajjasani commented on a change in pull request #982:
URL: https://github.com/apache/phoenix/pull/982#discussion_r530918621
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/rpc/UpdateCacheIT.java
##########
@@ -269,4 +317,49 @@ public void
testInvalidConnUpdateCacheFrequencyShouldThrow() throws Exception {
}
}
}
+
+ /**
+ * Helper Runnable impl class that continuously keeps checking
+ * if SYSTEM.MUTEX contains any record until either interrupted or
+ * provided connection is closed
+ */
+ private static class SystemMutexCaller implements Runnable {
Review comment:
@ChinmaySKulkarni We can use `DelegateConnectionQueryServices` and
override `writeMutexCell()`, sounds good, but I still feel from completeness of
IT test viewpoint, current one (threads scanning SYSTEM.MUTEX with specific
rowkey) could be better test. Thought?
Moreover, it is also confirmed that this same test fails 100% of times
without source changes in this PR. Tested in multiple runs.
----------------------------------------------------------------
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]
> No need to do checkAndPut when altering properties for a table or view with
> column-encoding enabled
> ---------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-6082
> URL: https://issues.apache.org/jira/browse/PHOENIX-6082
> Project: Phoenix
> Issue Type: Improvement
> Affects Versions: 5.0.0, 4.15.0
> Reporter: Chinmay Kulkarni
> Assignee: Viraj Jasani
> Priority: Major
> Labels: performance, phoenix-hardening, quality-improvement
> Fix For: 5.1.0, 4.16.0
>
>
> ALTER TABLE/VIEW SET <property> follows the same code path as an add column.
> Thus, when column-encoding is enabled on the physical table, we will do a
> checkAndPut with the <physical table schema name>, <physical table name> (see
> [this|https://github.com/apache/phoenix/blob/4ddbe2688b78645bc73857141cec12cb1c08993b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java#L3940-L3947]).
> This makes sense when we are adding a column since this causes an update to
> the encoded column qualifier counter of the base table and we want to prevent
> any concurrent changes to this field. However, when setting properties, we
> don't update the column qualifier counter so this extra checkAndPut is
> unnecessary. The server-side [write-lock on the table header
> row|https://github.com/apache/phoenix/blob/4ddbe2688b78645bc73857141cec12cb1c08993b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java#L2619]
> followed by a [sequence number
> check|https://github.com/apache/phoenix/blob/4ddbe2688b78645bc73857141cec12cb1c08993b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java#L2684-L2691]
> should be sufficient and is already done.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)