nastra commented on code in PR #14997:
URL: https://github.com/apache/iceberg/pull/14997#discussion_r2672797167
##########
core/src/main/java/org/apache/iceberg/view/ViewMetadata.java:
##########
@@ -369,6 +369,12 @@ public Builder addSchema(Schema schema) {
private int addSchemaInternal(Schema schema) {
int newSchemaId = reuseOrCreateNewSchemaId(schema);
if (schemasById.containsKey(newSchemaId)) {
+ if (null == lastAddedSchemaId) {
Review Comment:
just FYI that this is most likely currently wrong, because the implication
of setting `lastAddedSchemaId` here is that the metadata update will contain a
`-1` as the schema ID in `addVersionInternal()`.
The internal state tracking is quite delicate here, so I'm currently
exploring a few other options on how to achieve a concurrent replace operation
to not fail due to internal state tracking in `ViewMetadata`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]