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

importccl: Support import resume for all input formats #43053

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

miretskiy
Copy link
Contributor

Add support for resuming imports for all inputs formats.
Add a unit test to verify resume behavior.

Release note (cli change): resume paused import

@miretskiy miretskiy requested review from dt and spaskob December 9, 2019 13:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@miretskiy
Copy link
Contributor Author

Please note, top 2 commits are being reviewed in #42476

@miretskiy miretskiy force-pushed the resume_other_formats branch 3 times, most recently from 6c81c9c to 42995ce Compare December 10, 2019 01:25
@miretskiy
Copy link
Contributor Author

Master picked up dependent changes; ready for review.

@spaskob
Copy link
Contributor

spaskob commented Dec 10, 2019 via email

Copy link
Contributor

@spaskob spaskob left a comment

Choose a reason for hiding this comment

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

I think you are missing read_import_mysqlout.go

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt, @miretskiy, and @spaskob)


pkg/ccl/importccl/import_processor_test.go, line 222 at r1 (raw file):


nit: keep it a 1-liner as well


pkg/ccl/importccl/import_processor_test.go, line 803 at r1 (raw file):

descr, &descr.PrimaryIndex, colMap, []tree.Datum{tree.NewDInt(tree.DInt(id))}, primaryIndexKeyPrefix)

long line

Copy link
Contributor Author

@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.

read_import_mysqlout.go
Good catch. Added; test updated.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt and @spaskob)


pkg/ccl/importccl/import_processor_test.go, line 803 at r1 (raw file):

Previously, spaskob (Spas Bojanov) wrote…
descr, &descr.PrimaryIndex, colMap, []tree.Datum{tree.NewDInt(tree.DInt(id))}, primaryIndexKeyPrefix)

long line

Done.

Copy link
Contributor

@spaskob spaskob left a comment

Choose a reason for hiding this comment

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

All Done

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt, @miretskiy, and @spaskob)


pkg/ccl/importccl/import_processor_test.go, line 245 at r2 (raw file):

			ExternalStorage: externalStorageFactory,
			BulkAdder: func(
				_ context.Context, _ *client.DB, _ hlc.Timestamp, _ storagebase.BulkAdderOptions) (storagebase.BulkAdder, error) {

long line


pkg/ccl/importccl/import_processor_test.go, line 312 at r2 (raw file):

			}

			processor.Run(context.TODO())

context.Background()


pkg/ccl/importccl/import_processor_test.go, line 333 at r2 (raw file):

			ExternalStorage: externalStorageFactory,
			BulkAdder: func(
				_ context.Context, _ *client.DB, _ hlc.Timestamp, _ storagebase.BulkAdderOptions) (storagebase.BulkAdder, error) {

long line


pkg/ccl/importccl/import_processor_test.go, line 344 at r2 (raw file):

	// In this test, we'll specify various resume positions for different input formats.
	// We expect that the rows before resume position will be skipped.
	// NB: We assume that the (external) test files are sorted and contain at least batchSize rows.

long line


pkg/ccl/importccl/import_processor_test.go, line 368 at r2 (raw file):

				// Setup progress consumer.
				go func() {
					// Consume progress reports. Since we expect every batch to be flushed (BulkAdderFlushesEveryBatch),

long lines


pkg/ccl/importccl/import_processor_test.go, line 379 at r2 (raw file):

				}()

				_, err := runImport(context.TODO(), flowCtx, spec, progCh)

context.Background()

Add support for resuming imports for all inputs formats.
Add a unit test to verify resume behavior.

Release note (cli change): resume paused import
Copy link
Contributor

@spaskob spaskob 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! 0 of 0 LGTMs obtained (waiting on @dt, @miretskiy, and @spaskob)

@miretskiy
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Dec 10, 2019
43053: importccl: Support import resume for all input formats r=miretskiy a=miretskiy

Add support for resuming imports for all inputs formats.
Add a unit test to verify resume behavior.

Release note (cli change): resume paused import

Co-authored-by: Yevgeniy Miretskiy <yevgeniy@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Dec 10, 2019

Build succeeded

@craig craig bot merged commit d2c2d73 into cockroachdb:master Dec 10, 2019
@miretskiy miretskiy deleted the resume_other_formats branch December 10, 2019 22:10
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.

None yet

3 participants