Skip to content

Commit

Permalink
Merge #35663
Browse files Browse the repository at this point in the history
35663: kv: disable size check on marshaling to reduce panics r=ajwerner a=ajwerner

This disables a portion of the additional checking added in #35202 because it
increases the rate of panics. This case should be re-enabled with the complete
resolution of #34241.

Release note: None

Co-authored-by: Andrew Werner <[email protected]>
  • Loading branch information
craig[bot] and ajwerner committed Mar 12, 2019
2 parents dc908f4 + a548eba commit a512e39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/kv/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ func (gt *grpcTransport) maybeResurrectRetryablesLocked() bool {
func withMarshalingDebugging(ctx context.Context, ba roachpb.BatchRequest, f func()) {
nPre := ba.Size()
defer func() {
// TODO(ajwerner): re-enable the pre-emptive panic case below when the sizes
// do not match. The case is being disabled temporarily to reduce the
// rate of panics in the upcoming release. A more holistic fix which
// eliminates the shallow copies of transactions is coming soon.
nPost := ba.Size()
if r := recover(); r != nil || nPre != nPost {
if r := recover(); r != nil /* || nPre != nPost */ {
var buf strings.Builder
_, _ = fmt.Fprintf(&buf, "batch size %d -> %d bytes\n", nPre, nPost)
func() {
Expand Down
1 change: 1 addition & 0 deletions pkg/kv/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func (m *mockInternalClient) RangeFeed(

func TestWithMarshalingDebugging(t *testing.T) {
defer leaktest.AfterTest(t)()
t.Skip(fmt.Sprintf("Skipped until #34241 is resolved"))

ctx := context.Background()

Expand Down

0 comments on commit a512e39

Please sign in to comment.