{"push_id":1230801002,"size":1,"distinct_size":1,"ref":"refs/heads/stats-and-trigger","head":"2896b8ca125f654d54b683d53345274715f94740","before":"3bc8edd50b8067bd0531f2206e8bdbcc8cde404f","commits":[{"sha":"2896b8ca125f654d54b683d53345274715f94740","author":{"name":"Tobias Schottdorf","email":"b6841086cafcf6616505d164b61ac2cf1ab42c4e@gmail.com"},"message":"storage: refactor for proposer-eval'ed kv\n\nStarting from `applyRaftCommand`, refactor in preparation for #6286 (which at\nthis point is \"almost\" closed, missing only a second audit and some refactoring\nwhich makes it *impossible* for those methods to do anything but use the\nbatch).\n\nDue to the subtlety of this change, it should be a prime suspect for anomalies\nin the near future. The movement of code may have changed some test semantics\nin subtle ways, in the most dangerous case letting them pass while hiding a\nregression. However, most of the changes were relatively mechanical and\nappropriate care has been taken.\n\nPrepare `applyRaftCommand` for #6290. After that issue, `applyRaftCommand`\nwill operate on a supplied `WriteBatch` and an associated protobuf containing\ninformation necessary to execute all relevant side effects.\n\nThe `WriteBatch` will be constructed on the lease holder (by calling some new\nmethod which will contain much of what is now the part of `applyRaftCommand`\nleading down to `executeWriteBatch`).\n\nThe heavy lifting here is removing all spurious side effects from the state\nmachine methods multiplexed to via `(*Replica).executeCmd`.\n\nIn particular, in this change we\n\n- remove a first handful of `(*Batch).Defer`s, introduced a type\n  `proposalResult` which along with the `WriteBatch` must contain all the\n  information necessary for applying the command. Sprinkled TODOs liberally to\n  give a general sense of what's to be done.\n\n- hoist communicating MVCCStats delta to store and leave a TODO for the\n  handling of `ReplicaCorruptionError`s.\n\n- isolate a maybeGossipSystemConfig trigger\n\n- remove all of the uses of `batch.Defer()` in `replica_command.go`, for\n  instance on Split, Merge (required some stats cleanup), GC, TruncateLog,\n  ChangeFrozen, RequestLease, TransferLease; lift their side effects\n  appropriately as well\n\n- move call to `setDesc` to trigger\n\n- remove Defer in handleRaftReady\n\n- move checksum computation and verification to triggers\n\n- reset ContainsEstimates in split post-commit trigger (in effect moving that\n  hack up from splitTrigger)\n\n- move lease success/error counter update to trigger","distinct":true,"url":"https://api.github.com/repos/tschottdorf/cockroach/commits/2896b8ca125f654d54b683d53345274715f94740"}]}
{"actor":{"display_login":"tschottdorf"}}