Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCode hacks
+ // !!!
+ restarted := false
+ cliContext.TestingKnobs.StoreTestingKnobs.TestingCommandFilter =
+ func(args storageutils.FilterArgs) *roachpb.Error {
+ switch req := args.Req.(type) {
+ case *roachpb.PutRequest:
+ if bytes.Contains(req.Value.RawBytes, []byte("marker")) && !restarted {
+ log.Infof("!!! injecting retry error")
+ restarted = true
+ return roachpb.NewErrorWithTxn(
+ roachpb.NewTransactionRetryError(), args.Hdr.Txn)
+ }
+ }
+ return nil
+ }
Press h to open a hovercard with more details.