Code hacks

Andrei Matei edited this page Apr 18, 2016 · 3 revisions
+       // !!!
+       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
+               }
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.