-
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.
Browse files
Browse the repository at this point in the history
56379: workload/schemachange: improve error screening r=ajwerner a=jayshrivastava workload/schemachange: improve error screening Several ops will be updated to screen for errors (#56119): - dropTable - dropView - createSequence - renameSequence - dropSequence - insertRow Sequences were also updated to have more interesting cases: non-existing sequences can randomly be returned and sequences can be owned by columns. Furthermore, this change fixes a bug where non-existing tables were getting returned instead of existing ones. Finally, error screening logic is updated to ignore transaction retry errors. This fixes one of the issues in #56230. 57034: cli: add reset-quorum command r=knz a=TheSamHuang This adds `reset-quorum` as a command in the debug CLI. This command utilizes the functionality added in #56333 to recover unavailable ranges where all replicas are lost. 57272: roachtest: Add missing gossiped StoreDescriptor to expected relocate errors r=nvanbenschoten a=nvanbenschoten Closes #57191. This seems possible shortly after the cluster starts up, if gossip hasn't propagated by the time the `ALTER TABLE _ EXPERIMENTAL_RELOCATE _` statement is run. 57274: roachtest: remove initial disk space check from drop test r=nvanbenschoten a=nvanbenschoten Fixes #56040. Will need to be backported. This assertion seemed like a good idea, but it was repeatedly (dec148a) a source of flakiness when fixtures changed. Now that we're using IMPORT for TPC-C, the check is even harder to get right without making it so small as to be useless. It doesn't seem to be worth the instability, so remove it. 57454: util/log: de-flake TestSecondaryGC and some SQL tests r=irfansharif a=knz Fixes #57442 Fixes #57444 See individual commits for details. Co-authored-by: Jayant Shrivastava <[email protected]> Co-authored-by: Sam Huang <[email protected]> Co-authored-by: Nathan VanBenschoten <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information
Showing
14 changed files
with
649 additions
and
95 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Copyright 2020 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package cli | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"strconv" | ||
|
||
"github.com/cockroachdb/cockroach/pkg/roachpb" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var debugResetQuorumCmd = &cobra.Command{ | ||
Use: "reset-quorum [range ID]", | ||
Short: "Reset quorum on the given range" + | ||
" by designating the target node as the sole voter.", | ||
Long: ` | ||
Reset quorum on the given range by designating the current node as | ||
the sole voter. Any existing data for the range is discarded. | ||
This command is UNSAFE and should only be used with the supervision | ||
of Cockroach Labs support. It is a last-resort option to recover a | ||
specified range after multiple node failures and loss of quorum. | ||
Data on any surviving replicas will not be used to restore quorum. | ||
Instead, these replicas will be removed irrevocably. | ||
`, | ||
Args: cobra.ExactArgs(1), | ||
RunE: MaybeDecorateGRPCError(runDebugResetQuorum), | ||
} | ||
|
||
func runDebugResetQuorum(cmd *cobra.Command, args []string) error { | ||
ctx, cancel := context.WithCancel(context.Background()) | ||
defer cancel() | ||
|
||
rangeID, err := strconv.ParseInt(args[0], 10, 32) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
// Set up GRPC Connection for running ResetQuorum. | ||
cc, _, finish, err := getClientGRPCConn(ctx, serverCfg) | ||
if err != nil { | ||
return err | ||
} | ||
defer finish() | ||
|
||
// Call ResetQuorum to reset quorum for given range on target node. | ||
_, err = roachpb.NewInternalClient(cc).ResetQuorum(ctx, &roachpb.ResetQuorumRequest{ | ||
RangeID: int32(rangeID), | ||
}) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
fmt.Printf("ok; please verify https://<ui>/#/reports/range/%d", rangeID) | ||
|
||
return nil | ||
} |
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.