Skip to content

Commit

Permalink
update up to 7.1.63 (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSh1 authored Sep 12, 2024
1 parent fb19336 commit ce26dc7
Show file tree
Hide file tree
Showing 34 changed files with 2,819 additions and 680 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ else()
endif()

project(foundationdb
VERSION 7.1.61
VERSION 7.1.63
DESCRIPTION "FoundationDB is a scalable, fault-tolerant, ordered key-value store with full ACID transactions."
HOMEPAGE_URL "http://www.foundationdb.org/"
LANGUAGES C CXX ASM)
Expand Down
24 changes: 24 additions & 0 deletions documentation/sphinx/source/release-notes/release-notes-710.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@
Release Notes
#############

7.1.61
======
* Same as 7.1.60 release with AVX enabled.

7.1.60
======
* Released with AVX disabled.
* Fixed a DR corruption bug due to a race condition. `(PR #11245) <https://github.com/apple/foundationdb/pull/11245>`_
* Added Go tenanting support for 7.1. `(PR #11278) <https://github.com/apple/foundationdb/pull/11278>`_
* Increased visibility of gray failure actions. `(PR #11314) <https://github.com/apple/foundationdb/pull/11314>`_
* Increase visibility of CommitProxyTerminated events for failed_to_progress errors. `(PR #11316) <https://github.com/apple/foundationdb/pull/11316>`_
* Fixed an infinite retry of GRV request bug. `(PR #11352) <https://github.com/apple/foundationdb/pull/11352>`_
* Improved distributed consistency checker to continuously run by default and visibility of recruitment errors. `(PR #11351) <https://github.com/apple/foundationdb/pull/11351>`_
* Fix an assertion failure of cluster controller when waiting for recovery. `(PR #11398) <https://github.com/apple/foundationdb/pull/11398>`_

7.1.59
======
* Same as 7.1.59 release with AVX enabled.

7.1.58
======
* Released with AVX disabled.
* Fixed a bug in consistency checker urgent mode. `(PR #11230) <https://github.com/apple/foundationdb/pull/11230>`_

7.1.57
======
* Same as 7.1.56 release with AVX enabled.
Expand Down
17 changes: 17 additions & 0 deletions fdbbackup/backup.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "flow/genericactors.actor.h"
#include "flow/TLSConfig.actor.h"

#include "fdbclient/DatabaseContext.h"
#include "fdbclient/FDBTypes.h"
#include "fdbclient/BackupAgent.actor.h"
#include "fdbclient/Status.h"
Expand Down Expand Up @@ -4098,6 +4099,14 @@ int main(int argc, char* argv[]) {
Optional<Database> result = connectToCluster(clusterFile, localities, quiet);
if (result.present()) {
db = result.get();
// Make sure we are setting a transaction timeout and retry limit to prevent cases
// where the fdbbackup command hangs infinitely. 60 seconds should be more than
// enough for all cases to finish and 5 retries should also be good enough for
// most cases.
db->setOption(FDBDatabaseOptions::TRANSACTION_TIMEOUT,
Optional<StringRef>(StringRef((const uint8_t*)60000, 8)));
db->setOption(FDBDatabaseOptions::TRANSACTION_RETRY_LIMIT,
Optional<StringRef>(StringRef((const uint8_t*)5, 8)));
}

return result.present();
Expand All @@ -4114,6 +4123,14 @@ int main(int argc, char* argv[]) {
Optional<Database> result = connectToCluster(sourceClusterFile, localities, quiet);
if (result.present()) {
sourceDb = result.get();
// Make sure we are setting a transaction timeout and retry limit to prevent cases
// where the fdbbackup command hangs infinitely. 60 seconds should be more than
// enough for all cases to finish and 5 retries should also be good enough for
// most cases.
sourceDb->setOption(FDBDatabaseOptions::TRANSACTION_TIMEOUT,
Optional<StringRef>(StringRef((const uint8_t*)60000, 8)));
sourceDb->setOption(FDBDatabaseOptions::TRANSACTION_RETRY_LIMIT,
Optional<StringRef>(StringRef((const uint8_t*)5, 8)));
}

return result.present();
Expand Down
44 changes: 34 additions & 10 deletions fdbcli/DebugCommands.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,24 @@ ACTOR Future<bool> getallCommandActor(Database cx, std::vector<StringRef> tokens
// hidden commands, no help text for now
CommandFactory getallCommandFactory("getall");

std::string printStorageServerMachineInfo(const StorageServerInterface& server) {
std::string serverIp = server.address().toString();
std::string serverLocality = server.locality.toString();
return serverLocality + " " + serverIp;
}

std::string printAllStorageServerMachineInfo(const std::vector<StorageServerInterface>& servers) {
std::string res;
for (int i = 0; i < servers.size(); i++) {
if (i == 0) {
res = printStorageServerMachineInfo(servers[i]);
} else {
res = res + "; " + printStorageServerMachineInfo(servers[i]);
}
}
return res;
}

// check that all replies are the same. Update begin to the next key to check
// checkResults keeps invariants:
// (1) hasMore = true if any server has more data not read yet
Expand All @@ -190,6 +208,11 @@ bool checkResults(Version version,
for (int j = 0; j < replies.size(); j++) {
if (firstValidServer == -1) {
firstValidServer = j;
// Print full list of comparing servers and the reference server
// Used to check server info which does not produce an inconsistency log
printf("CheckResult: servers: %s, reference server: %s\n",
printAllStorageServerMachineInfo(servers).c_str(),
printStorageServerMachineInfo(servers[firstValidServer]).c_str());
continue; // always select the first server as reference
}
// compare reference and current
Expand All @@ -213,8 +236,8 @@ bool checkResults(Version version,
// have the key
printf("Inconsistency: UniqueKey, %s(1), %s(0), CurrentIndex %lu, ReferenceIndex %lu, Version %ld, Key "
"%s\n",
servers[firstValidServer].address().toString().c_str(),
servers[j].address().toString().c_str(),
printStorageServerMachineInfo(servers[firstValidServer]).c_str(),
printStorageServerMachineInfo(servers[j]).c_str(),
currentI,
referenceI,
version,
Expand All @@ -223,8 +246,8 @@ bool checkResults(Version version,
} else if (referenceI >= reference.data.size()) {
printf("Inconsistency: UniqueKey, %s(1), %s(0), CurrentIndex %lu, ReferenceIndex %lu, Version %ld, Key "
"%s\n",
servers[j].address().toString().c_str(),
servers[firstValidServer].address().toString().c_str(),
printStorageServerMachineInfo(servers[j]).c_str(),
printStorageServerMachineInfo(servers[firstValidServer]).c_str(),
currentI,
referenceI,
version,
Expand All @@ -238,8 +261,8 @@ bool checkResults(Version version,
printf("Inconsistency: MismatchValue, %s(1), %s(1), CurrentIndex %lu, ReferenceIndex %lu, "
"Version %ld, "
"Key %s\n",
servers[firstValidServer].address().toString().c_str(),
servers[j].address().toString().c_str(),
printStorageServerMachineInfo(servers[firstValidServer]).c_str(),
printStorageServerMachineInfo(servers[j]).c_str(),
currentI,
referenceI,
version,
Expand All @@ -250,8 +273,8 @@ bool checkResults(Version version,
} else if (currentKV.key < referenceKV.key) {
printf("Inconsistency: UniqueKey, %s(1), %s(0), CurrentIndex %lu, ReferenceIndex %lu, Version %ld, "
"Key %s\n",
servers[j].address().toString().c_str(),
servers[firstValidServer].address().toString().c_str(),
printStorageServerMachineInfo(servers[j]).c_str(),
printStorageServerMachineInfo(servers[firstValidServer]).c_str(),
currentI,
referenceI,
version,
Expand All @@ -260,8 +283,8 @@ bool checkResults(Version version,
} else {
printf("Inconsistency: UniqueKey, %s(1), %s(0), CurrentIndex %lu, ReferenceIndex %lu, Version %ld, "
"Key %s\n",
servers[firstValidServer].address().toString().c_str(),
servers[j].address().toString().c_str(),
printStorageServerMachineInfo(servers[firstValidServer]).c_str(),
printStorageServerMachineInfo(servers[j]).c_str(),
currentI,
referenceI,
version,
Expand All @@ -271,6 +294,7 @@ bool checkResults(Version version,
}
}
}

return allSame;
}

Expand Down
47 changes: 47 additions & 0 deletions fdbkubernetesmonitor/api/annotations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// annotations.go
//
// This source file is part of the FoundationDB open source project
//
// Copyright 2021-2024 Apple Inc. and the FoundationDB project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package api

const (
// CurrentConfigurationAnnotation is the annotation we use to store the
// latest configuration.
CurrentConfigurationAnnotation = "foundationdb.org/launcher-current-configuration"

// EnvironmentAnnotation is the annotation we use to store the environment
// variables.
EnvironmentAnnotation = "foundationdb.org/launcher-environment"

// OutdatedConfigMapAnnotation is the annotation we read to get notified of
// outdated configuration.
OutdatedConfigMapAnnotation = "foundationdb.org/outdated-config-map-seen"

// DelayShutdownAnnotation defines how long the FDB Kubernetes monitor process should sleep before shutting itself down.
// The FDB Kubernetes monitor will always shutdown all fdbserver processes, independent of this setting.
// The value of this annotation must be a duration like "60s".
DelayShutdownAnnotation = "foundationdb.org/delay-shutdown"

// ClusterFileChangeDetectedAnnotation is the annotation that will be updated if the fdb.cluster file is updated.
ClusterFileChangeDetectedAnnotation = "foundationdb.org/cluster-file-change"

// IsolateProcessGroupAnnotation is the annotation that defines if the current Pod should be isolated. Isolated
// process groups will shutdown the fdbserver instance but keep the Pod and other Kubernetes resources running
// for debugging purpose.
IsolateProcessGroupAnnotation = "foundationdb.org/isolate-process-group"
)
24 changes: 18 additions & 6 deletions fdbkubernetesmonitor/api/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the FoundationDB open source project
//
// Copyright 2021 Apple Inc. and the FoundationDB project authors
// Copyright 2021-2024 Apple Inc. and the FoundationDB project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,13 +25,15 @@ import (
"os"
"strconv"
"strings"

"k8s.io/utils/pointer"
)

// ProcessConfiguration models the configuration for starting a FoundationDB
// process.
type ProcessConfiguration struct {
// Version provides the version of FoundationDB the process should run.
Version string `json:"version"`
Version *Version `json:"version"`

// RunServers defines whether we should run the server processes.
// This defaults to true, but you can set it to false to prevent starting
Expand Down Expand Up @@ -95,8 +97,7 @@ const (
IPListArgumentType = "IPList"
)

// GenerateArgument processes an argument and generates its string
// representation.
// GenerateArgument processes an argument and generates its string representation.
func (argument Argument) GenerateArgument(processNumber int, env map[string]string) (string, error) {
switch argument.ArgumentType {
case "":
Expand Down Expand Up @@ -134,9 +135,11 @@ func (argument Argument) LookupEnv(env map[string]string) (string, error) {
if env != nil {
value, present = env[argument.Source]
}

if !present {
value, present = os.LookupEnv(argument.Source)
}

if !present {
return "", fmt.Errorf("missing environment variable %s", argument.Source)
}
Expand All @@ -163,11 +166,11 @@ func (argument Argument) LookupEnv(env map[string]string) (string, error) {
}
return "", fmt.Errorf("could not find IP with family %d", argument.IPFamily)
}

return value, nil
}

// GenerateArguments interprets the arguments in the process configuration and
// generates a command invocation.
// GenerateArguments interprets the arguments in the process configuration and generates a command invocation.
func (configuration *ProcessConfiguration) GenerateArguments(processNumber int, env map[string]string) ([]string, error) {
results := make([]string, 0, len(configuration.Arguments)+1)
if configuration.BinaryPath != "" {
Expand All @@ -182,3 +185,12 @@ func (configuration *ProcessConfiguration) GenerateArguments(processNumber int,
}
return results, nil
}

// ShouldRunServers returns true if RunServers is unset or set to true.
func (configuration *ProcessConfiguration) ShouldRunServers() bool {
if configuration == nil {
return false
}

return pointer.BoolDeref(configuration.RunServers, true)
}
Loading

0 comments on commit ce26dc7

Please sign in to comment.