Skip to content

Merge Sharding tests in Go migrated from Python#5790

Merged
deepthi merged 5 commits intovitessio:masterfrom
planetscale:tal_merge_sharding
Feb 6, 2020
Merged

Merge Sharding tests in Go migrated from Python#5790
deepthi merged 5 commits intovitessio:masterfrom
planetscale:tal_merge_sharding

Conversation

@ajeetj
Copy link
Copy Markdown
Contributor

@ajeetj ajeetj commented Feb 5, 2020

  • The base structure is copied from resharding test case
  • Minor changes in base_sharding.go as we are comparing multiple values now
  • updated config for merge sharding

Signed-off-by: Ajeet jain <ajeet@planetscale.com>
Signed-off-by: Ajeet jain <ajeet@planetscale.com>
@ajeetj ajeetj requested a review from sougou as a code owner February 5, 2020 11:13
Signed-off-by: Ajeet jain <ajeet@planetscale.com>
@ajeetj ajeetj force-pushed the tal_merge_sharding branch from 165cc39 to e1b4096 Compare February 5, 2020 16:29
Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

A few nits. Otherwise looks good. I can approve once they are addressed.


// TestV3MergeShardingString - tests merge sharding using a Byte column
func TestV3MergeShardingString(t *testing.T) {
sharding.TestMergesharding(t, true)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it will be nice to add /* useVarbinaryShardingKeyType */ before true.
Also why v3 in the name? v2 is no longer relevant, so we can remove that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

shard2 = &cluster.Shard{Name: "80-"}

// merge shard
// merging -40 & 40-80 t0 -80
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

type: t0 -> to

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

)

// TestV3MergeSharding - tests merge sharding using a INT column
func TestV3MergeSharding(t *testing.T) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same comment here. remove v3, add comment before boolean.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated

test/config.json Outdated
]
},
"merge_sharding": {
"File": "mergesharding_v3_test.go",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

rename v3 -> int

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated

Signed-off-by: Ajeet jain <ajeet@planetscale.com>
@ajeetj
Copy link
Copy Markdown
Contributor Author

ajeetj commented Feb 6, 2020

@deepthi Addressed review comments. Waiting for checks to pass.

Signed-off-by: Ajeet jain <ajeet@planetscale.com>
@ajeetj ajeetj force-pushed the tal_merge_sharding branch from 867e40b to 85410f1 Compare February 6, 2020 05:49
Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

Nice work!

@deepthi deepthi merged commit ebe6d45 into vitessio:master Feb 6, 2020
@deepthi deepthi deleted the tal_merge_sharding branch February 6, 2020 22:34
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.

2 participants