Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changefeedccl: remove deprecated poller #38211

Merged
merged 1 commit into from
Jun 26, 2019
Merged

Conversation

danhhz
Copy link
Contributor

@danhhz danhhz commented Jun 17, 2019

We switched the default to push-based rangefeeds in 19.1. This removes
the old pull-based poller fallback entirely.

Details of the removal:

  • The relevant code is removed
  • Several poller-related hacks are removed
  • The changefeed.run.push.enabled telemetry metric is removed
  • The changefeed.push.enabled cluster setting is removed
  • The poller subtest is removed from each changefeedccl test
  • The cdc/poller roachtest is skipped on 19.2+
  • TestValidations is removed, it's redundant with the much better
    quality TestChangefeedNemeses

Note that the table history still does some polling, but switching this
to RangeFeed will cause an unacceptable increase in the commit-to-emit
latency of rows. This bit of polling will be removed as part of #36289.
This commit also leaves the structure of the changefeed code mostly
unchanged. There is an opportunity for cleanup here, but this also will
wait for after #36289.

Closes #36914

Release note: None

@danhhz danhhz requested review from tbg and a team June 17, 2019 15:00
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@danhhz
Copy link
Contributor Author

danhhz commented Jun 17, 2019

@rolandcrosby Any objection to removing the changefeed.run.push.enabled telemetry here (the poller is being removed and it previously was counting poller vs rangefeed)?

@rolandcrosby
Copy link

@danhhz Sounds good to me.

Copy link
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 13 of 13 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @danhhz)


pkg/ccl/changefeedccl/bench_test.go, line 215 at r1 (raw file):

	ctx, cancel := context.WithCancel(ctx)
	go func() { _ = poller.RunUsingRangefeeds(ctx) }()

Is poller now a misnomer? Not that I'd have a better suggestion.

@danhhz danhhz force-pushed the cdc_poller branch 3 times, most recently from 5b4a6aa to c890311 Compare June 26, 2019 00:26
We switched the default to push-based rangefeeds in 19.1. This removes
the old pull-based poller fallback entirely.

Details of the removal:
- The relevant code is removed
- Several poller-related hacks are removed
- The changefeed.run.push.enabled telemetry metric is removed
- The changefeed.push.enabled cluster setting is removed
- The poller subtest is removed from each changefeedccl test
- The cdc/poller roachtest is skipped on 19.2+
- TestValidations is removed, it's redundant with the much better
  quality TestChangefeedNemeses

Note that the table history still does some polling, but switching this
to RangeFeed will cause an unacceptable increase in the commit-to-emit
latency of rows. This bit of polling will be removed as part of cockroachdb#36289.
This commit also leaves the structure of the changefeed code mostly
unchanged. There is an opportunity for cleanup here, but this also will
wait for after cockroachdb#36289.

Closes cockroachdb#36914

Release note: None
Copy link
Contributor Author

@danhhz danhhz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I was fixing up the tests, I found some more cleanups in poller (including removing the last usage of EnableTimeBoundIteratorOptimization!)

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @tbg)


pkg/ccl/changefeedccl/bench_test.go, line 215 at r1 (raw file):

Previously, tbg (Tobias Grieger) wrote…

Is poller now a misnomer? Not that I'd have a better suggestion.

Yeah, ditto. Maybe something will come to me by the time I do #36289

Copy link
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 10 of 10 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@danhhz
Copy link
Contributor Author

danhhz commented Jun 26, 2019

Thanks for the review!

bors r=tbg

@craig
Copy link
Contributor

craig bot commented Jun 26, 2019

Build failed

@danhhz
Copy link
Contributor Author

danhhz commented Jun 26, 2019

Canceled with comment: Build revision not found Assuming this is a teamcity flake

bors r=tbg

@craig
Copy link
Contributor

craig bot commented Jun 26, 2019

Build failed

@danhhz
Copy link
Contributor Author

danhhz commented Jun 26, 2019

Flake is #38368

bors r=tbg

craig bot pushed a commit that referenced this pull request Jun 26, 2019
38211: changefeedccl: remove deprecated poller r=tbg a=danhhz

We switched the default to push-based rangefeeds in 19.1. This removes
the old pull-based poller fallback entirely.

Details of the removal:
- The relevant code is removed
- Several poller-related hacks are removed
- The changefeed.run.push.enabled telemetry metric is removed
- The changefeed.push.enabled cluster setting is removed
- The poller subtest is removed from each changefeedccl test
- The cdc/poller roachtest is skipped on 19.2+
- TestValidations is removed, it's redundant with the much better
  quality TestChangefeedNemeses

Note that the table history still does some polling, but switching this
to RangeFeed will cause an unacceptable increase in the commit-to-emit
latency of rows. This bit of polling will be removed as part of #36289.
This commit also leaves the structure of the changefeed code mostly
unchanged. There is an opportunity for cleanup here, but this also will
wait for after #36289.

Closes #36914

Release note: None

38418: storage: fix null pointer dereference in AdminMerge r=jeffrey-xiao a=jeffrey-xiao

Fixes #38427.

I noticed that `TestRepartitioning` was failing under stress on master with the following error:

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x20894f6]

...

        /usr/lib/go-1.12/src/runtime/panic.go:522 +0x1b5
github.com/cockroachdb/cockroach/pkg/storage.(*Replica).AdminMerge.func1(0xc00441e750, 0xc002a83e60, 0xc00020a880)
        /home/cockroach/go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_command.go:536 +0x226

...
```

The logic for retrieving the RHS descriptor before and after #38302 is not the same in the case where `rightDesc` does not exist. This PR changes it so the behavior is consistent.

It seems possible that the following branch can evaluate true, but I might be missing something here.
```go
// Verify that the two ranges are mergeable.
if !bytes.Equal(origLeftDesc.EndKey, rightDesc.StartKey) {
  // Should never happen, but just in case.
  return errors.Errorf("ranges are not adjacent; %s != %s", origLeftDesc.EndKey, rightDesc.StartKey)
}
```


38435: sql: Fixing interleave check for loose index scan r=rohany a=rohany

Fixing the interleave check for the loose index scan while interleave support is in progress.

Co-authored-by: Daniel Harrison <[email protected]>
Co-authored-by: Jeffrey Xiao <[email protected]>
Co-authored-by: Rohan Yadav <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jun 26, 2019

Build succeeded

@craig craig bot merged commit c7a195c into cockroachdb:master Jun 26, 2019
@danhhz danhhz deleted the cdc_poller branch April 3, 2020 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

changefeedccl: delete deprecated poller
4 participants