Github user JamesRTaylor commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/6#discussion_r15500727
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
@@ -493,11 +514,28 @@ private MutationState buildIndexAtTimeStamp(PTable
index, NamedTableNode dataTab
}
private MutationState buildIndex(PTable index, TableRef dataTableRef)
throws SQLException {
+ return buildIndex(index, dataTableRef, null);
+ }
+
+ private MutationState buildIndex(PTable index, TableRef dataTableRef,
+ Long lowerBoundTimeStamp) throws SQLException {
+ AlterIndexStatement indexStatement = null;
boolean wasAutoCommit = connection.getAutoCommit();
connection.rollback();
+ boolean needRestoreIndexState = false;
try {
connection.setAutoCommit(true);
MutationState state;
+ if(lowerBoundTimeStamp != null) {
--- End diff --
I think its better if this block of code lived in
buildPartialIndexFromTimeStamp, as it's not related to building the index.
Also, would you mind adding a comment about why you're setting the index from
DISABLED to INACTIVE? Is it so that incremental maintenance will start again
and data rows that are updated while the partial rebuild is occurring will get
added to the index (i.e. you won't miss any)?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---