virajjasani commented on code in PR #1534:
URL: https://github.com/apache/phoenix/pull/1534#discussion_r1047842719
##########
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:
##########
@@ -4373,10 +4380,39 @@ private PhoenixConnection upgradeSystemSequence(
} else {
nSequenceSaltBuckets = getSaltBuckets(e);
}
+
+ updateSystemSequenceWithCacheOnWriteProps(metaConnection);
}
return metaConnection;
}
+ private void updateSystemSequenceWithCacheOnWriteProps(PhoenixConnection
metaConnection) throws
+ IOException, SQLException {
+
+ try (Admin admin = getAdmin()) {
+ PTable pTable = PhoenixRuntime.getTable(metaConnection,
+ PhoenixDatabaseMetaData.SYSTEM_SEQUENCE_NAME);
+ TableDescriptor oldTD = admin.getDescriptor(
+
SchemaUtil.getPhysicalTableName(PhoenixDatabaseMetaData.SYSTEM_SEQUENCE_NAME,
+ metaConnection.getQueryServices().getProps()));
+ ColumnFamilyDescriptor oldCf = oldTD.getColumnFamily(
+ SchemaUtil.getEmptyColumnFamily(pTable));
+
+ // If the CacheOnWrite related properties are not set, lets set
them.
+ if (!oldCf.isCacheDataOnWrite()) {
Review Comment:
+1
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]