Skip to content

Commit

Permalink
SQL+Cassandra: add new refs columns to schema check (#7631)
Browse files Browse the repository at this point in the history
  • Loading branch information
snazy authored Oct 16, 2023
1 parent 0b00489 commit 513f256
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
6 changes: 5 additions & 1 deletion site/docs/try/server-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ in the _To_ column.
A red cross in the _Rolling Upgrade_ column means that rolling upgrades for the mentioned versions
are not supported and must be avoided.

**Also read the [release notes](releases.md).**
**Also read the [release notes on GitHub](https://github.com/projectnessie/nessie/releases) and the
[release notes page](releases.md).**

| Rolling Upgrade Supported | _From_ Nessie version | _To_ Nessie version |
|---------------------------|-----------------------|---------------------|
Expand All @@ -27,6 +28,9 @@ See [Releases](releases.md) for release notes.

## Rolling upgrades target version notes

**Also read the [release notes on GitHub](https://github.com/projectnessie/nessie/releases) and the
[release notes page](releases.md).**

### Nessie 0.61.0

The serialized format of internal key-indexes got bumped. For a rolling-upgrade to version 0.61.0 or newer, follow these
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COLS_OBJS_ALL;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COL_OBJ_ID;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COL_REFS_CREATED_AT;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COL_REFS_DELETED;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COL_REFS_EXTENDED_INFO;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COL_REFS_NAME;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COL_REFS_POINTER;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COL_REFS_PREVIOUS;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.COL_REPO_ID;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.CREATE_TABLE_OBJS;
import static org.projectnessie.versioned.storage.cassandra.CassandraConstants.CREATE_TABLE_REFS;
Expand Down Expand Up @@ -372,7 +375,14 @@ public void setupSchema() {
keyspace.get(),
TABLE_REFS,
CREATE_TABLE_REFS,
Stream.of(COL_REPO_ID, COL_REFS_NAME, COL_REFS_POINTER, COL_REFS_DELETED)
Stream.of(
COL_REPO_ID,
COL_REFS_NAME,
COL_REFS_POINTER,
COL_REFS_DELETED,
COL_REFS_CREATED_AT,
COL_REFS_EXTENDED_INFO,
COL_REFS_PREVIOUS)
.collect(Collectors.toSet()),
ImmutableMap.of(COL_REPO_ID, NAME.type(), COL_REFS_NAME, NAME.type()));
createTableIfNotExists(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@
import static org.projectnessie.versioned.storage.jdbc.JdbcColumnType.OBJ_ID;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COLS_OBJS_ALL;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COL_OBJ_ID;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COL_REFS_CREATED_AT;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COL_REFS_DELETED;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COL_REFS_EXTENDED_INFO;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COL_REFS_NAME;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COL_REFS_POINTER;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COL_REFS_PREVIOUS;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.COL_REPO_ID;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.CREATE_TABLE_OBJS;
import static org.projectnessie.versioned.storage.jdbc.SqlConstants.CREATE_TABLE_REFS;
Expand Down Expand Up @@ -111,7 +114,14 @@ public void setupSchema() {
conn,
TABLE_REFS,
CREATE_TABLE_REFS,
Stream.of(COL_REPO_ID, COL_REFS_NAME, COL_REFS_POINTER, COL_REFS_DELETED)
Stream.of(
COL_REPO_ID,
COL_REFS_NAME,
COL_REFS_POINTER,
COL_REFS_DELETED,
COL_REFS_CREATED_AT,
COL_REFS_EXTENDED_INFO,
COL_REFS_PREVIOUS)
.collect(Collectors.toSet()),
ImmutableMap.of(COL_REPO_ID, nameTypeId, COL_REFS_NAME, nameTypeId));
createTableIfNotExists(
Expand Down

0 comments on commit 513f256

Please sign in to comment.