rpuch commented on code in PR #3311:
URL: https://github.com/apache/ignite-3/pull/3311#discussion_r1506029981
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/snapshot/FullStateTransferIndexChooser.java:
##########
@@ -317,4 +337,23 @@ private long findStoppingActivationTsBusy(int indexId, int
toCatalogVersionInclu
private Set<Integer> tableIds(int catalogVersion) {
return
catalogService.tables(catalogVersion).stream().map(CatalogObjectDescriptor::id).collect(toSet());
}
+
+ private int tableVersionBusy(CatalogIndexDescriptor index, int
catalogVersion) {
+ CatalogTableDescriptor table = catalogService.table(index.tableId(),
catalogVersion);
+
+ assert table != null : "indexId=" + index.id() + ", tableId=" +
index.tableId() + ", catalogVersion=" + catalogVersion;
+
+ return table.tableVersion();
+ }
+
+ private List<IndexIdAndTableVersion>
toIndexIdAndTableVersionList(List<Integer> indexIds) {
Review Comment:
How about calling this `enrichWithTableVersions`?
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/index/IndexUpdateHandler.java:
##########
@@ -65,10 +65,33 @@ public void addToIndexes(@Nullable BinaryRow binaryRow,
RowId rowId, @Nullable L
}
for (TableSchemaAwareIndexStorage index : indexes(indexIds)) {
+ // TODO: IGNITE-21514 Handle index destruction
index.put(binaryRow, rowId);
}
}
+ /**
+ * Adds a binary row to the index, if the tombstone then skips such
operation.
Review Comment:
```suggestion
* Adds a binary row to the index, if it's a tombstone then skips such
operation.
```
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/snapshot/IndexIdAndTableVersion.java:
##########
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.table.distributed.raft.snapshot;
+
+import org.apache.ignite.internal.tostring.S;
+
+/** Container the index ID and table schema version at index creation. */
Review Comment:
```suggestion
/** Container for index ID and table schema version at index creation. */
```
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/snapshot/IndexIdAndBinaryRow.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.table.distributed.raft.snapshot;
+
+import org.apache.ignite.internal.schema.BinaryRow;
+
+/** Container the index ID and {@link BinaryRow}. */
Review Comment:
```suggestion
/** Container for index ID and {@link BinaryRow}. */
```
--
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]