diff --git a/pkg/cmd/publish-artifacts/main.go b/pkg/cmd/publish-artifacts/main.go index 773e47b23127..55241c4e3dd7 100644 --- a/pkg/cmd/publish-artifacts/main.go +++ b/pkg/cmd/publish-artifacts/main.go @@ -146,6 +146,9 @@ func buildAndPublishWorkload(providers []release.ObjectPutGetter, o opts, execFn log.Fatal(err) } o.AbsolutePath = filepath.Join(o.PkgDir, "bin", "workload") + if o.Platform == release.PlatformLinuxArm { + o.AbsolutePath += release.SuffixFromPlatform(o.Platform) + } for _, provider := range providers { release.PutNonRelease( provider, diff --git a/pkg/cmd/publish-artifacts/main_test.go b/pkg/cmd/publish-artifacts/main_test.go index 1b3af5eabbc5..ea6e0267c510 100644 --- a/pkg/cmd/publish-artifacts/main_test.go +++ b/pkg/cmd/publish-artifacts/main_test.go @@ -253,8 +253,8 @@ func TestPublish(t *testing.T) { "'--workspace_status_command=./build/bazelutil/stamp.sh aarch64-unknown-linux-gnu official-binary' " + "-c opt --config=ci --config=force_build_cdeps --config=crosslinuxarmbase", "gs://edge-binaries-bucket/cockroach/lib/libgeos_c.linux-gnu-arm64.so.LATEST/no-cache REDIRECT /cockroach/lib/libgeos_c.linux-gnu-arm64.1234567890abcdef.so", - "gs://edge-binaries-bucket/cockroach/workload.1234567890abcdef CONTENTS env=[] args=bazel build //pkg/cmd/workload -c opt --config=crosslinuxarmbase --config=ci", - "gs://edge-binaries-bucket/cockroach/workload.LATEST/no-cache REDIRECT /cockroach/workload.1234567890abcdef", + "gs://edge-binaries-bucket/cockroach/workload.linux-gnu-arm64.1234567890abcdef CONTENTS env=[] args=bazel build //pkg/cmd/workload -c opt --config=crosslinuxarmbase --config=ci", + "gs://edge-binaries-bucket/cockroach/workload.linux-gnu-arm64.LATEST/no-cache REDIRECT /cockroach/workload.linux-gnu-arm64.1234567890abcdef", "gs://edge-binaries-bucket/cockroach/cockroach.darwin-amd64.1234567890abcdef CONTENTS env=[] args=bazel build " + "//pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos " + "'--workspace_status_command=./build/bazelutil/stamp.sh x86_64-apple-darwin19 official-binary' " + diff --git a/pkg/kv/kvserver/replica_raft.go b/pkg/kv/kvserver/replica_raft.go index 4e07aef86788..f7ea9397bd91 100644 --- a/pkg/kv/kvserver/replica_raft.go +++ b/pkg/kv/kvserver/replica_raft.go @@ -647,8 +647,8 @@ func (r *Replica) stepRaftGroup(req *kvserverpb.RaftMessageRequest) error { // include MsgVotes), so don't campaign if we wake up our raft // group. return r.withRaftGroup(false, func(raftGroup *raft.RawNode) (bool, error) { - // If we're not the leader, and we receive a message from a non-leader - // replica while quiesced, we wake up the leader too. This prevents spurious + // If we're a follower, and we receive a message from a non-leader replica + // while quiesced, we wake up the leader too. This prevents spurious // elections. // // This typically happens in the case of a partial network partition where @@ -665,7 +665,12 @@ func (r *Replica) stepRaftGroup(req *kvserverpb.RaftMessageRequest) error { // Note that such partial partitions will typically result in persistent // mass unquiescence due to the continuous prevotes. if r.mu.quiescent { - if !r.isRaftLeaderRLocked() && req.FromReplica.ReplicaID != r.mu.leaderID { + st := r.raftBasicStatusRLocked() + hasLeader := st.RaftState == raft.StateFollower && st.Lead != 0 + fromLeader := uint64(req.FromReplica.ReplicaID) == st.Lead + if hasLeader && !fromLeader { + // TODO(erikgrinaker): This is likely to result in election ties, find + // some way to avoid that. r.maybeUnquiesceAndWakeLeaderLocked() } else { r.maybeUnquiesceWithOptionsLocked(false /* campaignOnWake */) diff --git a/pkg/release/build.go b/pkg/release/build.go index 3f6be098b4a7..cb550e971017 100644 --- a/pkg/release/build.go +++ b/pkg/release/build.go @@ -131,7 +131,7 @@ func SharedLibraryExtensionFromPlatform(platform Platform) string { } // MakeWorkload makes the bin/workload binary. It is only ever built in the -// crosslinux configuration. +// crosslinux and crosslinuxarm configurations. func MakeWorkload(platform Platform, opts BuildOptions, pkgDir string) error { if opts.Release { return errors.Newf("cannot build workload in Release mode") @@ -151,7 +151,7 @@ func MakeWorkload(platform Platform, opts BuildOptions, pkgDir string) error { if err != nil { return err } - return stageBinary("//pkg/cmd/workload", platform, bazelBin, filepath.Join(pkgDir, "bin"), false) + return stageBinary("//pkg/cmd/workload", platform, bazelBin, filepath.Join(pkgDir, "bin"), platform == PlatformLinuxArm) } // MakeRelease makes the release binary and associated files.