Skip to content

bulk,importccl: re-read settings during ingestion#42268

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
dt:import-settings
Nov 7, 2019
Merged

bulk,importccl: re-read settings during ingestion#42268
craig[bot] merged 1 commit intocockroachdb:masterfrom
dt:import-settings

Conversation

@dt
Copy link
Copy Markdown
Contributor

@dt dt commented Nov 7, 2019

Prior to this patch, the bulk-ingestion helpers were configured with size limits read from settings,
but then executed, sometimes for hours, against those values that were passed in, not reacting to
later changes in the underlying setting.

This change plumbs those values though as func() int64 instead of int64, re-reading the setting value
each time it is used and thus reflecting any changes to the underlying setting during execution.

Also, while I'm here: switch uint64 to int64 to match our usual style guidelines.

Release note (bug fix): fix bug where some settings changes were not reflected during currently running IMPORTs.

@dt dt requested review from ajwerner and miretskiy November 7, 2019 13:58
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

:lgtm:

Just the one comment, take it or leave it.

Reviewed 8 of 8 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @dt and @miretskiy)


pkg/storage/bulk/sst_batcher.go, line 307 at r1 (raw file):

			b.flushedToCurrentRange = size
		}
		if b.splitAfter != nil && b.flushedToCurrentRange > b.splitAfter() && nextKey != nil {

This changes the meaning of a zero value split after. Do you want to keep the behavior of zero disabling the behavior ?

Copy link
Copy Markdown
Contributor Author

@dt dt left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner and @miretskiy)


pkg/storage/bulk/sst_batcher.go, line 307 at r1 (raw file):

Previously, ajwerner wrote…

This changes the meaning of a zero value split after. Do you want to keep the behavior of zero disabling the behavior ?

My thinking was that the zero-value of a func() is nil, and that still has the same meaning.

I guess though if you hooked it up to a cluster setting (it isn’t currently) the user’s only choice would be to set to 0 and not eliminate the func altogether, so maybe I do want to check non-nil and >0.

Will do.

Copy link
Copy Markdown
Contributor

@miretskiy miretskiy left a comment

Choose a reason for hiding this comment

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

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

@dt dt force-pushed the import-settings branch 2 times, most recently from b1b0a86 to 2ba3829 Compare November 7, 2019 15:55
Prior to this patch, the bulk-ingestion helpers were configured with size limits read from settings,
but then executed, sometimes for hours, against those values that were passed in, not reacting to
later changes in the underlying setting.

This change plumbs those values though as func() int64 instead of int64, re-reading the setting value
each time it is used and thus reflecting any changes to the underlying setting during execution.

Also, while I'm here: switch uint64 to int64 to match our usual style guidelines.

Release note (bug fix): fix bug where some settings changes were not reflected during currently running IMPORTs.
@dt dt force-pushed the import-settings branch from 2ba3829 to aaf5a86 Compare November 7, 2019 18:01
@dt
Copy link
Copy Markdown
Contributor Author

dt commented Nov 7, 2019

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 7, 2019

Build failed (retrying...)

craig bot pushed a commit that referenced this pull request Nov 7, 2019
42225: storage/engine: remove runWithAllEngines r=petermattis a=petermattis

Replace usage of `runWithAllEngines` with the more widely used for-loop
over `mvccEngineImpls`.

Fixes #42060

Release note: None

42235: roachtest: update gopg ORM test r=yuzefovich a=yuzefovich

There was a new release of gopg ORM which included a couple of PRs that
improved the tool's testing infrastructure. Namely, the new release has
several environment variables that can override the default options, and
now we will use those. Also, there was a minor modification of error
matching, so we can remove one of the tests from the ignore lists.

Fixes: #41890.

Release note: None

42268: bulk,importccl: re-read settings during ingestion r=dt a=dt

Prior to this patch, the bulk-ingestion helpers were configured with size limits read from settings,
but then executed, sometimes for hours, against those values that were passed in, not reacting to
later changes in the underlying setting.

This change plumbs those values though as func() int64 instead of int64, re-reading the setting value
each time it is used and thus reflecting any changes to the underlying setting during execution.

Also, while I'm here: switch uint64 to int64 to match our usual style guidelines.

Release note (bug fix): fix bug where some settings changes were not reflected during currently running IMPORTs.

Co-authored-by: Peter Mattis <petermattis@gmail.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: David Taylor <tinystatemachine@gmail.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 7, 2019

Build succeeded

@craig craig bot merged commit aaf5a86 into cockroachdb:master Nov 7, 2019
@dt dt deleted the import-settings branch November 20, 2019 18:44
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.

4 participants