VReplication: _vt.vreplication source column VARBINARY->BLOB#6421
VReplication: _vt.vreplication source column VARBINARY->BLOB#6421sougou merged 2 commits intovitessio:masterfrom
Conversation
There was a problem hiding this comment.
We now have a framework (and a policy) for upgrades. They should always be alter statements on top of the existing ones. The withddl package should be used to for managing the upgrades.
Having said that, there are more problems with this table than just this blob. I'd prefer that we design and work on a single consolidated fix to minimize the number of alters one has to apply for upgrades.
|
@sougou ok, do we have some consolidated idea of what a redesign of this table might look like? |
@rohit-nayak-ps and I discussed some ideas, and some of the thoughts are in @shlomi-noach issue #6352. Essentially, we need to sit down and hash this out. But there have been other priorities. |
|
This particular change itself is harmless because the change is backward compatible. But I'm worried about different versions of the table floating around, which can cause uncertainty during troubleshooting. Instead, we should just prioritize the refactoring of this table and fix all the other problems that exist with it. So, I propose that we close this PR for now. |
|
@sougou |
@teejae use
give or take |
8acecd2 to
5515a02
Compare
Signed-off-by: Toliver Jue <toliver@planetscale.com>
5515a02 to
0717e81
Compare
|
@shlomi-noach thanks for the pointers. @sougou back to you. |
|
|
||
| // AlterVReplicationTableSourceToBlob changes source column of vreplication table to BLOB | ||
| var AlterVReplicationTableSourceToBlob = []string{ | ||
| "ALTER TABLE _vt.vreplication MODIFY source BLOB NOT NULL", |
There was a problem hiding this comment.
I think this should just be part of AlterVReplicationTable. The comment // AlterVReplicationTable adds new columns to vreplication table is misleading: AlterVReplicationTable is about all transformation post-CREATE.
There was a problem hiding this comment.
yea, i debated whether it belongs there. i figured we wanted to keep order of all migration steps...just in case
There was a problem hiding this comment.
If anything, putting all statements into the same array is the best guarantee for order.
There was a problem hiding this comment.
i was wondering whether the Alter and Create should just be combined. i don't see any reason not to.
There was a problem hiding this comment.
Do you mean like the CREATE should be part of the array itself? I think that makes sense.
| allddls := append([]string{}, binlogplayer.CreateVReplicationTable()...) | ||
| allddls = append(allddls, binlogplayer.AlterVReplicationTable...) | ||
| allddls = append(allddls, createReshardingJournalTable, createCopyState) | ||
| allddls = append(allddls, binlogplayer.AlterVReplicationTableSourceToBlob...) |
There was a problem hiding this comment.
This can be removed once query is moved into AlterVReplicationTable
Signed-off-by: Toliver Jue <toliver@planetscale.com>
ee108bf to
92eace9
Compare
Signed-off-by: Toliver Jue toliver@planetscale.com
Change the
sourcecolumn to have unlimited size (4gb), to allow for larger vreplication source content, such as many tables.sourcecolumn data.