amogh-jahagirdar commented on code in PR #10861:
URL: https://github.com/apache/iceberg/pull/10861#discussion_r1704575946
##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1015,6 +1015,11 @@ public Builder upgradeFormatVersion(int
newFormatVersion) {
"Cannot downgrade v%s table to v%s",
formatVersion,
newFormatVersion);
+ Preconditions.checkArgument(
+ newFormatVersion <= formatVersion + 1,
+ "Cannot skip format version(s) to upgrade v%s table to v%s",
+ formatVersion,
+ newFormatVersion);
Review Comment:
> My only goal here would be to make sure that we don't support 2 different
upgrade paths.
Thanks for this clarification, that makes sense to me. Having a single
upgrade path makes it easier to rationalize about any issues that come up for
an update (we don't have to think about "Oh does X happen when it's 1 to 3
directly or something else". It's a single path and so in case of any issues it
must be at some specific point in the path).
I think I'm overall good with that, as long as we can keep the combinatorics
to a minimum for testing. Which I think your strategy is as good as it gets?
--
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]