Skip to content

Bump Nessie to 0.8.2 + related changes - #2588

Merged
rymurr merged 5 commits into
apache:masterfrom
snazy:nessie-0.6
Jul 15, 2021
Merged

Bump Nessie to 0.8.2 + related changes#2588
rymurr merged 5 commits into
apache:masterfrom
snazy:nessie-0.6

Conversation

@snazy

@snazysnazy commented May 13, 2021

Copy link
Copy Markdown
Member

@nastranastra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes LGTM

@snazy

Copy link
Copy Markdown
MemberAuthor

Should worth to have projectnessie/nessie#1249 merged into Nessie first and use Nessie 0.6.1 in this PR then.

@rymurr

Copy link
Copy Markdown
Contributor

Looks like this needs a rebase. @snazy do you still want to update to 0.6.1?

@snazy
snazyforce-pushed the nessie-0.6 branch 2 times, most recently from a25ee34 to ebc441fCompareMay 27, 2021 16:14
@snazysnazy changed the title Bump Nessie to 0.6.0 + add CommitStateUnknownExceptionBump Nessie to 0.6.1 + add CommitStateUnknownExceptionMay 27, 2021
@snazy

Copy link
Copy Markdown
MemberAuthor

Yup, updated this PR to bump Nessie to 0.6.1.

Comment threadversions.props Outdated
@rymurr

Copy link
Copy Markdown
Contributor

@snazy looks like the build failed for java8. Presumably its the recent chagne to nessie server to not support java8?

@snazy

Copy link
Copy Markdown
MemberAuthor

@snazy looks like the build failed for java8. Presumably its the recent chagne to nessie server to not support java8?

Oh yea, projectnessie/nessie#1245 broke the test runs. It's not that the Nessie Client in Iceberg is broken, it's "just" the server that cannot run. Reverting projectnessie/nessie#1245 doesn't make much sense, because Quarkus 2 drops support for Java 8 entirely.

I see these options here:

  1. Skip the Nessie tests with "Iceberg Java 8" for now (to get this one in)
  2. Change the :iceberg-nessie test setup to actually start the Nessie Server in a separate process using Java 11, preferably using the now published Nessie-Server uber-jar or, maybe easier, using test-containers.

I think, option 1 is a good workaround for now and then follow-up with option 2 within a short time. WDYT?

@rymurr

Copy link
Copy Markdown
Contributor

I see no rush to get this patch in. The only deadline is the 0.12.0 release. So lets fix the tests correctly.

Lets go with the uber-jar too. I don't want to complicate the CI and introduce another build dependency.

Comment threadnessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java Outdated
@snazy
snazyforce-pushed the nessie-0.6 branch 3 times, most recently from 2b6bbb5 to 53ab73aCompareJuly 9, 2021 10:47
@snazy
snazyforce-pushed the nessie-0.6 branch 2 times, most recently from 3e5c976 to 5e425d6CompareJuly 13, 2021 11:18
@snazysnazy changed the title Bump Nessie to 0.6.1 + add CommitStateUnknownExceptionBump Nessie to 0.8.0 + related changesJul 13, 2021

@nastranastra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with one question

Comment threadversions.props Outdated
Comment threadnessie/src/main/java/org/apache/iceberg/nessie/UpdateableReference.java Outdated
@snazy

Copy link
Copy Markdown
MemberAuthor

Tests pass locally w/ Java 11 + Java 8 against latest in-dev Nessie.

@snazysnazy changed the title Bump Nessie to 0.8.0 + related changesBump Nessie to 0.8.2 + related changesJul 15, 2021
Comment threadnessie/src/main/java/org/apache/iceberg/nessie/UpdateableReference.java Outdated

@rymurrrymurr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are two things:

  1. more documentation of the individual changes - some aren't clear
  2. separate into a few changes

Comment threadnessie/src/main/java/org/apache/iceberg/nessie/TableReference.java Outdated
@snazy
snazyforce-pushed the nessie-0.6 branch 2 times, most recently from 2badb38 to 8bd6f75CompareJuly 15, 2021 16:48
Comment threadnessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java Outdated
Comment threadnessie/src/main/java/org/apache/iceberg/nessie/UpdateableReference.java Outdated
Comment threadversions.props Outdated
snazy added 5 commits July 15, 2021 22:32
More changes in this PR in following commits.
Replace Gradle plugin with new JUnit extension.
See [Add JAX-RS tests and add JUnit/Jupyter extension](projectnessie/nessie#1566)
Apply changes to Iceberg required by API changes in Nessie:
* [Re-introduce wrapper classes for query params of CommitLog/Entries](projectnessie/nessie#1595)
* [Server-side commit range filtering](projectnessie/nessie#1596)
* [Add hashOnRef query param to support time travel on a named ref](projectnessie/nessie#1589)
* [Only accept NamedRefs in REST API](projectnessie/nessie#1583)
Nessie's `Contents.id` is a random ID generated when the `Contents.Key` is first used (think:
CREATE TABLE) and must not be changed. This change addresses a bug in the Iceberg-Nesie code
that caused a new id for every change.
When commiting a change, the Nessie-API now returns the hash of the commit for the change.
This returned hash should then be used as the "expected hash" for the next commit.
The previous approach was to commit the change to Nessie and then do another request to
retrieve the new hash of HEAD.
This old approach is prone to a race condition, namely when another commit happens after
"this" commit but before retrieving the "new HEAD", so "this" instance would wrongly
ignore the other commit's changes during conflict checks.
See [Let VersionStore.create()+commit() return the current hash](projectnessie/nessie#1089)

@rymurrrymurr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @snazy !!

@rymurr
rymurr merged commit 2be228d into apache:masterJul 15, 2021
@snazy
snazy deleted the nessie-0.6 branch July 16, 2021 06:37
minchowang pushed a commit to minchowang/iceberg that referenced this pull request Aug 2, 2021
* Bump Nessie to 0.8.2 + replace Gradle plugin with new JUnit extension
More changes in this PR in following commits.
Replace Gradle plugin with new JUnit extension.
See [Add JAX-RS tests and add JUnit/Jupyter extension](projectnessie/nessie#1566)
* Changes required by Nessie-API changes
Apply changes to Iceberg required by API changes in Nessie:
* [Re-introduce wrapper classes for query params of CommitLog/Entries](projectnessie/nessie#1595)
* [Server-side commit range filtering](projectnessie/nessie#1596)
* [Add hashOnRef query param to support time travel on a named ref](projectnessie/nessie#1589)
* [Only accept NamedRefs in REST API](projectnessie/nessie#1583)
* Bugfix: must send the Contents.id of the existing table
Nessie's `Contents.id` is a random ID generated when the `Contents.Key` is first used (think:
CREATE TABLE) and must not be changed. This change addresses a bug in the Iceberg-Nesie code
that caused a new id for every change.
* Throw `CommitStateUnknownException` for `renameTable` as well
Follow-up of apache#2515
* Fix race-condition & save one roundtrip to Nessie during "commit"
When commiting a change, the Nessie-API now returns the hash of the commit for the change.
This returned hash should then be used as the "expected hash" for the next commit.
The previous approach was to commit the change to Nessie and then do another request to
retrieve the new hash of HEAD.
This old approach is prone to a race condition, namely when another commit happens after
"this" commit but before retrieving the "new HEAD", so "this" instance would wrongly
ignore the other commit's changes during conflict checks.
See [Let VersionStore.create()+commit() return the current hash](projectnessie/nessie#1089)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@snazy@rymurr@nastra@cwsteinbach