-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
102842: sql: do not purge range cache when using follower reads r=yuzefovich a=yuzefovich Previously, when we used the closest replica oracle and happened to pick a follower for a distributed plan, the TableReaders would still produce "misplanned ranges" metadata. This would then lead to purging the range cache of supposedly stale entries on the gateway even though the entries weren't stale. This is now fixed by setting `ignoreMisplannedRanges` flag on the TableReader spec. One of the approaches to solve this issue mentioned propagating a set of `ClientRangeInfo`s as part of the TableReader spec, but that seems more complicated and much more involved than this one, so the simpler approach was chosen. In particular, for that idea to work we'd need to include all Infos for all ranges intersecting with the spans to read (which can be non-trivial in size) as well as to add code on the TableReader side to compare the gateway's `ClientRangeInfo` with the range cache of the node where the TableReader was placed. Fixes: #61313. Release note: None 104303: roachtest: update CI to enable metamorphic arm64 and fips r=smg260 a=srosenberg Support for metamorphic arm64 and fips roachtests has been added in [1]. This change refactors the CI wrapper script to add the missing arm64 and fips builds for the required binaries and libs. In addition, we change roachtest's CLI arg. `--cockroach-short` to `cockroach-ea` which better captures the fact that this binary is compiled with _enabled assertions_, i.e., crdb_test using crdb_test build tag. The fact that it's a "short" variant, i.e., without UI, is immaterial at this time. In future, we might explore roachtests which involve the UI, in which case `--cockroach-ea` might be replaced by the ("long") crdb binary. [1] #103710 Epic: none Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Stan Rosenberg <[email protected]>
- Loading branch information
Showing
23 changed files
with
340 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 59 additions & 23 deletions
82
build/teamcity/cockroach/nightlies/roachtest_compile_bits.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,63 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Builds all bits needed for roachtests, stages them in bin/ and lib.docker_amd64/. | ||
platform=${1:-crosslinux} | ||
|
||
bazel build --config $platform --config ci --config with_ui -c opt --config force_build_cdeps \ | ||
//pkg/cmd/cockroach //pkg/cmd/workload //pkg/cmd/roachtest \ | ||
//c-deps:libgeos | ||
bazel build --config $platform --config ci -c opt //pkg/cmd/cockroach-short --crdb_test | ||
BAZEL_BIN=$(bazel info bazel-bin --config $platform --config ci --config with_ui -c opt) | ||
# Move this stuff to bin for simplicity. | ||
# Builds all bits needed for roachtests, stages them in bin/ and lib/. | ||
cross_builds=(crosslinux crosslinuxarm crosslinuxfips) | ||
|
||
# Prepare the bin/ and lib/ directories. | ||
mkdir -p bin | ||
chmod o+rwx bin | ||
cp $BAZEL_BIN/pkg/cmd/cockroach/cockroach_/cockroach bin | ||
# Copy the binary with enabled assertions while adding "-ea" suffix (which | ||
# stands for "enabled assertions"). | ||
cp $BAZEL_BIN/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short bin/cockroach-short-ea | ||
cp $BAZEL_BIN/pkg/cmd/roachtest/roachtest_/roachtest bin | ||
cp $BAZEL_BIN/pkg/cmd/workload/workload_/workload bin | ||
chmod a+w bin/cockroach bin/cockroach-short-ea bin/roachtest bin/workload | ||
# Stage the geos libs in the appropriate spot. | ||
mkdir -p lib.docker_amd64 | ||
chmod o+rwx lib.docker_amd64 | ||
cp $BAZEL_BIN/c-deps/libgeos_foreign/lib/libgeos.so lib.docker_amd64 | ||
cp $BAZEL_BIN/c-deps/libgeos_foreign/lib/libgeos_c.so lib.docker_amd64 | ||
chmod a+w lib.docker_amd64/libgeos.so lib.docker_amd64/libgeos_c.so | ||
ln -s lib.docker_amd64 lib | ||
mkdir -p lib | ||
chmod o+rwx lib | ||
|
||
for platform in "${cross_builds[@]}"; do | ||
if [[ $platform == crosslinux ]]; then | ||
os=linux | ||
arch=amd64 | ||
elif [[ $platform == crosslinuxarm ]]; then | ||
os=linux | ||
arch=arm64 | ||
elif [[ $platform == crosslinuxfips ]]; then | ||
os=linux | ||
arch=amd64-fips | ||
else | ||
echo "unknown or unsupported platform $platform" | ||
exit 1 | ||
fi | ||
|
||
echo "Building $platform, os=$os, arch=$arch..." | ||
# Build cockroach, workload and geos libs. | ||
bazel build --config $platform --config ci --config with_ui -c opt --config force_build_cdeps \ | ||
//pkg/cmd/cockroach //pkg/cmd/workload \ | ||
//c-deps:libgeos | ||
# N.B. roachtest is currently executed only on a TC agent running linux/amd64, so we build it once. | ||
if [[ $os == "linux" && $arch == "amd64" ]]; then | ||
bazel build --config $platform --config ci -c opt //pkg/cmd/roachtest | ||
fi | ||
# Build cockroach-short with assertions enabled. | ||
bazel build --config $platform --config ci -c opt //pkg/cmd/cockroach-short --crdb_test | ||
# Copy the binaries. | ||
BAZEL_BIN=$(bazel info bazel-bin --config $platform --config ci --config with_ui -c opt) | ||
# N.B. currently, we support only one roachtest binary, so elide the suffix. | ||
if [[ $os == "linux" && $arch == "amd64" ]]; then | ||
cp $BAZEL_BIN/pkg/cmd/roachtest/roachtest_/roachtest bin/roachtest | ||
# Make it writable to simplify cleanup and copying (e.g., scp retry). | ||
chmod a+w bin/roachtest | ||
fi | ||
cp $BAZEL_BIN/pkg/cmd/cockroach/cockroach_/cockroach bin/cockroach.$os-$arch | ||
cp $BAZEL_BIN/pkg/cmd/workload/workload_/workload bin/workload.$os-$arch | ||
# N.B. "-ea" suffix stands for enabled-assertions. | ||
cp $BAZEL_BIN/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short bin/cockroach-ea.$os-$arch | ||
# Make it writable to simplify cleanup and copying (e.g., scp retry). | ||
chmod a+w bin/cockroach.$os-$arch bin/workload.$os-$arch bin/cockroach-ea.$os-$arch | ||
|
||
# Copy geos libs. | ||
cp $BAZEL_BIN/c-deps/libgeos_foreign/lib/libgeos.so lib/libgeos.$os-$arch.so | ||
cp $BAZEL_BIN/c-deps/libgeos_foreign/lib/libgeos_c.so lib/libgeos_c.$os-$arch.so | ||
# Make it writable to simplify cleanup and copying (e.g., scp retry). | ||
chmod a+w lib/libgeos.$os-$arch.so lib/libgeos_c.$os-$arch.so | ||
|
||
done | ||
|
||
ls -l bin | ||
ls -l lib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.