From 73395d2c3e99c97dda68bf6bbe8c2368e973f507 Mon Sep 17 00:00:00 2001 From: Alec Grieser Date: Wed, 4 May 2022 15:27:13 -0700 Subject: [PATCH] Resolves #1636: Increase FDB Java version to FDB 7.1 (#1641) * Resolves #1636: Increase FDB Java version to FDB 7.1 This increases the FDB Java dependency to FDB 7.1. This keeps the API version at 630 so that the library can still be used to connect to FDB 6.3 and FDB 7.0 clusters, though it would now require using a 7.1 FDB C client as the primary client with the other clients as external clients. This will allow for additional features to be built on top of FDB 7.1, though we probably want to also complete #1639 so that we can responsibly guard features reliant on 7.1 in environments where the cluster may still be running older FDB server versions. * Resolves #1640: Dependency bump for 3.2 release This updates the proto3 version to 3.20.1 and updates a few other dependencies as well. It leaves the guava version at 30.1-jre instead of updating it to 31.1-jre because that causes spotbugs violations regarding nullability problems. I think those errors are because of a possible change in the way Guava handles nullability annotations, but it seems like something we should fix later. * fix capitalization in documentation --- build/Dockerfile.build | 6 +++--- build/Dockerfile.fdbserver | 6 +++--- build/docker-compose.yaml | 4 ++-- docs/ReleaseNotes.md | 16 ++++++++++++---- docs/Versioning.md | 4 ++-- .../InstrumentedReadTransaction.java | 19 +++++++++++++++++++ gradle.properties | 10 +++++----- 7 files changed, 46 insertions(+), 19 deletions(-) diff --git a/build/Dockerfile.build b/build/Dockerfile.build index 1f9d73cacb..cf5213d552 100644 --- a/build/Dockerfile.build +++ b/build/Dockerfile.build @@ -1,5 +1,5 @@ FROM centos:7 -LABEL version=0.0.17 +LABEL version=0.0.18 RUN yum install -y \ git \ @@ -10,8 +10,8 @@ RUN yum install -y \ unzip \ wget \ which \ - https://github.com/apple/foundationdb/releases/download/6.3.16/foundationdb-clients-6.3.16-1.el7.x86_64.rpm \ - https://github.com/apple/foundationdb/releases/download/6.3.16/foundationdb-server-6.3.16-1.el7.x86_64.rpm && \ + https://github.com/apple/foundationdb/releases/download/7.1.3/foundationdb-clients-7.1.3-1.el7.x86_64.rpm \ + https://github.com/apple/foundationdb/releases/download/7.1.3/foundationdb-server-7.1.3-1.el7.x86_64.rpm && \ yum clean all && \ rm -rf /var/cache/yum diff --git a/build/Dockerfile.fdbserver b/build/Dockerfile.fdbserver index 343f569016..506932a6f2 100644 --- a/build/Dockerfile.fdbserver +++ b/build/Dockerfile.fdbserver @@ -1,5 +1,5 @@ FROM centos:7 -LABEL version=6.3.16-1 +LABEL version=7.1.3-1 RUN yum install -y \ which \ @@ -7,8 +7,8 @@ RUN yum install -y \ rsync \ net-tools \ passwd \ - https://github.com/apple/foundationdb/releases/download/6.3.16/foundationdb-clients-6.3.16-1.el7.x86_64.rpm \ - https://github.com/apple/foundationdb/releases/download/6.3.16/foundationdb-server-6.3.16-1.el7.x86_64.rpm && \ + https://github.com/apple/foundationdb/releases/download/7.1.3/foundationdb-clients-7.1.3-1.el7.x86_64.rpm \ + https://github.com/apple/foundationdb/releases/download/7.1.3/foundationdb-server-7.1.3-1.el7.x86_64.rpm && \ yum clean all && \ rm -rf /var/cache/yum diff --git a/build/docker-compose.yaml b/build/docker-compose.yaml index 29fc9da6d1..5443d572ed 100644 --- a/build/docker-compose.yaml +++ b/build/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3" services: common: &common - image: fdb-record-layer-build:0.0.16 + image: fdb-record-layer-build:0.0.18 build: context: . dockerfile: Dockerfile.build @@ -17,7 +17,7 @@ services: - FDBHOSTNAME=fdbserver fdbserver: - image: foundationdb-server:6.3.12-1 + image: foundationdb-server:7.1.3-1 environment: - FDBSTARTOPT=2 - HOST_IP=0.0.0.0 diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index 61514ae435..d55174dfac 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -4,11 +4,13 @@ This document contains a log of changes to the FoundationDB Record Layer. It aim As the [versioning guide](Versioning.md) details, it cannot always be determined solely by looking at the version numbers whether one Record Layer version contains all changes included in another. In particular, bug fixes and backwards-compatible changes might be back-ported to or introduced as patches against older versions. To track when a patch version has been included in the main release train, some releases will say as a note that they contain all changes from a specific patch. -## 3.1 +## 3.2 ### Breaking Changes -This version of the Record Layer changes the Java source and target compatibility to version 11. Downstream projects need to be aware that the byte code produced is of class file version `55.0` going forward. +The FoundationDB Java binding dependency has been updated to 7.1 with this release. This means that clients also need to update their main FDB C client to a 7.1 version. Adopters that still wish to connect to an FDB cluster running a 6.3 or 7.0 server version can do so by packaging additional FDB C clients at the appropriate version(s) using the [FDB multi-version client feature](https://apple.github.io/foundationdb/api-general.html#multi-version-client). + +This release also updates downstream dependency versions. Most notably, the proto3 artifacts now require Protobuf version 3.20.1. +## 3.1 + +### Breaking Changes + +This version of the Record Layer changes the Java source and target compatibility to version 11. Downstream projects need to be aware that the byte code produced is of class file version `55.0` going forward. + ### 3.1.256.0 * **Feature** Create a transactional runner that does not retry [(Issue #1615)](https://github.com/FoundationDB/fdb-record-layer/issues/1615) diff --git a/docs/Versioning.md b/docs/Versioning.md index e0440f77a1..11f86a136a 100644 --- a/docs/Versioning.md +++ b/docs/Versioning.md @@ -32,7 +32,7 @@ Then the following dependency can be added: ``` org.foundationdb fdb-record-layer-core - 3.1.+ + 3.2.+ ``` Older builds are also available in the maven central repository, and newer builds will be published there upon the resolution of [Issue #1288](https://github.com/FoundationDB/fdb-record-layer/issues/1288). @@ -53,7 +53,7 @@ repositories { Then the following dependency can be added: ``` -"org.foundationdb:fdb-record-layer-core:3.1.+" +"org.foundationdb:fdb-record-layer-core:3.2.+" ``` Older builds are also available in the `mavenCentral()` repository, and newer builds will be published there upon the resolution of [Issue #1288](https://github.com/FoundationDB/fdb-record-layer/issues/1288). diff --git a/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/InstrumentedReadTransaction.java b/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/InstrumentedReadTransaction.java index b561b0ee39..36dbead8c4 100644 --- a/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/InstrumentedReadTransaction.java +++ b/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/InstrumentedReadTransaction.java @@ -20,8 +20,10 @@ package com.apple.foundationdb.record.provider.foundationdb; +import com.apple.foundationdb.KeyArrayResult; import com.apple.foundationdb.KeySelector; import com.apple.foundationdb.KeyValue; +import com.apple.foundationdb.MappedKeyValue; import com.apple.foundationdb.Range; import com.apple.foundationdb.ReadTransaction; import com.apple.foundationdb.StreamingMode; @@ -192,6 +194,23 @@ public AsyncIterable getRange(Range range, int limit, boolean reverse, return new ByteCountingAsyncIterable(underlying.getRange(checkKey(range), limit, reverse, streamingMode)); } + @Override + public AsyncIterable getMappedRange(final KeySelector begin, final KeySelector end, final byte[] mapper, final int limit, final boolean reverse, final StreamingMode mode) { + increment(FDBStoreTimer.Counts.READS); + increment(FDBStoreTimer.Counts.RANGE_READS); + return underlying.getMappedRange(begin, end, mapper, limit, reverse, mode); + } + + @Override + public CompletableFuture getRangeSplitPoints(final Range range, final long chunkSize) { + return underlying.getRangeSplitPoints(range, chunkSize); + } + + @Override + public CompletableFuture getRangeSplitPoints(final byte[] begin, final byte[] end, final long chunkSize) { + return underlying.getRangeSplitPoints(begin, end, chunkSize); + } + @Override public CompletableFuture getEstimatedRangeSizeBytes(final byte[] begin, final byte[] end) { return underlying.getEstimatedRangeSizeBytes(begin, end); diff --git a/gradle.properties b/gradle.properties index 304ba62c94..509af8591d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ # rootProject.name=fdb-record-layer -version=3.1 +version=3.2 releaseBuild=false # this should be false for release branches (i.e. if there is no -SNAPSHOT on the above version) @@ -29,12 +29,12 @@ group=org.foundationdb org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Xverify:none -XX:+TieredCompilation -fdbVersion=6.3.12 +fdbVersion=7.1.3 jsr305Version=3.0.2 -slf4jVersion=1.7.30 +slf4jVersion=1.7.36 commonsLang3Version=3.12.0 commonsMath3Version=3.6.1 -log4jVersion=2.17.1 +log4jVersion=2.17.2 guavaVersion=30.1-jre hamcrestVersion=2.2 # AutoService kept on 1.0-rc6 to avoid annotation being retained in CLASS. See: https://github.com/FoundationDB/fdb-record-layer/issues/1281 @@ -46,7 +46,7 @@ junitVersion=5.7.1 jacocoVersion=0.8.5 protobuf2Version=2.6.1 -protobuf3Version=3.15.6 +protobuf3Version=3.20.1 mavenLocalEnabled=false org.gradle.daemon=true