Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #1636: Increase FDB Java version to FDB 7.1 #1641

Merged
merged 3 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions build/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM centos:7
LABEL version=0.0.17
LABEL version=0.0.18

RUN yum install -y \
git \
Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions build/Dockerfile.fdbserver
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM centos:7
LABEL version=6.3.16-1
LABEL version=7.1.3-1

RUN yum install -y \
which \
initscripts \
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

Expand Down
4 changes: 2 additions & 2 deletions build/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 13 additions & 5 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
### Breaking changes
MMcM marked this conversation as resolved.
Show resolved Hide resolved

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.

<!--
// begin next release
Expand All @@ -29,15 +31,21 @@ This version of the Record Layer changes the Java source and target compatibilit
* **Feature** Feature 3 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Feature** Feature 4 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Feature** Feature 5 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Breaking change** Change 1 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Breaking change** Change 2 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Breaking change** The FDB dependency has been updated to require version 7.1 [(Issue #1636)](https://github.com/FoundationDB/fdb-record-layer/issues/1636)
* **Breaking change** Additional downstream dependency versions have been upgraded, including Protobuf [(Issue #1640)](https://github.com/FoundationDB/fdb-record-layer/issues/1640)
* **Breaking change** Change 3 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Breaking change** Change 4 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Breaking change** Change 5 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)

// end next release
-->

## 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)
Expand Down
4 changes: 2 additions & 2 deletions docs/Versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Then the following dependency can be added:
```
<groupId>org.foundationdb</groupId>
<artifactId>fdb-record-layer-core</artifactId>
<version>3.1.+</version>
<version>3.2.+</version>
```

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).
Expand All @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -192,6 +194,23 @@ public AsyncIterable<KeyValue> getRange(Range range, int limit, boolean reverse,
return new ByteCountingAsyncIterable(underlying.getRange(checkKey(range), limit, reverse, streamingMode));
}

@Override
public AsyncIterable<MappedKeyValue> 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know for certain that no counters should be incremented for these calls? (for getMappedRange work has been done on the index prefetch branch, but I am not aware of similar work for the getRangeSplitPoints)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm...not sure, actually. It looks like that method probably uses the byte sample to get an estimate for relatively equally sized key ranges. My instinct was to treat these like getEstimatedRangeSizeBytes as of a similar type, and leave it uninstrumented. That being said, I'm not opposed to adding instrumentation here, either in this PR or in a follow up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure. We can leave uninstrumented and change in followup PR.

public CompletableFuture<KeyArrayResult> getRangeSplitPoints(final Range range, final long chunkSize) {
return underlying.getRangeSplitPoints(range, chunkSize);
}

@Override
public CompletableFuture<KeyArrayResult> getRangeSplitPoints(final byte[] begin, final byte[] end, final long chunkSize) {
return underlying.getRangeSplitPoints(begin, end, chunkSize);
}

@Override
public CompletableFuture<Long> getEstimatedRangeSizeBytes(final byte[] begin, final byte[] end) {
return underlying.getEstimatedRangeSizeBytes(begin, end);
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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