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

streamingccl: unrevert graceful cutover of stream ingestion #69262

Merged
merged 1 commit into from
Aug 29, 2021

Conversation

adityamaru
Copy link
Contributor

@adityamaru adityamaru commented Aug 23, 2021

In #68918 we reverted
a change that taught stream ingestion processors to wait for a cutover
on losing connection to the client. This was the first part of introducing
the concept of generations to c2c streaming. The change was reverted due
to a leaked goroutine during stress testing.

This change does not alter any of the core logic but simply makes the test
more reliable by adding a Streaming testing knob. This allows us to intercept
when the stream ingestion processor receives an Event and perform the necessary
testing.

Fixes: #68701
Fixes: #68795

Release justification (non-production code changes): Revert a revert
of previously checked in logic by fixing the testing infrastructure
that was leaking the goroutine.

@adityamaru adityamaru requested review from pbardea and a team August 23, 2021 23:17
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@adityamaru
Copy link
Contributor Author

I have stressraced both these tests for ~20 minutes on a gceworker and not got a failure/leaked goroutine.

In cockroachdb#68918 we reverted
a change that taught stream ingestion processors to wait for a cutover
on losing connection to the client. This was the first part of introducing
the concept of generations to c2c streaming. The change was reverted due
to a leaked goroutine during stress testing.

This change does not alter any of the core logic but simply makes the test
more reliable by adding a `Streaming` testing knob. This allows us to intercept
when the stream ingestion processor receives an Event and perform the necessaery
testing.

Release justification: non-production code changes. Revert a revert
of previously checked in logic by fixing the testing infrastructure
that was leaking the goroutine.
@adityamaru
Copy link
Contributor Author

Unrelated bazel failure.

bors r=pbardea

@craig
Copy link
Contributor

craig bot commented Aug 29, 2021

Build succeeded:

@craig craig bot merged commit 8213411 into cockroachdb:master Aug 29, 2021
adityamaru added a commit to adityamaru/cockroach that referenced this pull request Sep 21, 2021
This test does not flake anymore. There have been fixes around
leaked goroutines that have been checked in in the recent past
but the test mistakenly remained skipped:
cockroachdb#69262

I got 3000 runs under stress.

Fixes: cockroachdb#68704
craig bot pushed a commit that referenced this pull request Sep 28, 2021
70513: streamingccl: unskip TestStreamIngestionFrontierProcessor r=rhu713 a=adityamaru

This test does not flake anymore. There have been fixes around
leaked goroutines that have been checked in in the recent past
but the test mistakenly remained skipped:
#69262

I got 3000 runs under stress.

Fixes: #68704

70734: colencoding: reuse scratch space when key decoding bytes and decimals r=yuzefovich a=yuzefovich

When we're key decoding bytes-like columns, we need to use the scratch
byte slice to decode into (in case of decimals, we might need the space
temporarily). Previously, we would always allocate a new byte slice only
to deep copy it later when calling `coldata.Bytes.Set`. This commit
teaches the cFetcher and the relevant decoding methods to reuse the same
scratch space which should reduce the memory allocations.

One notable change is that now when we're calling
`DecodeBytesAscending`, we have to make sure to perform a deep copy so
that it is safe to reuse the returned value as the scratch space in the
future.

Release note: None

Co-authored-by: Aditya Maru <adityamaru@gmail.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants