Skip to content

fix: migration for update_index#3464

Merged
dnephin merged 1 commit intomainfrom
dnephin/fix-default-update-index
Oct 17, 2022
Merged

fix: migration for update_index#3464
dnephin merged 1 commit intomainfrom
dnephin/fix-default-update-index

Conversation

@dnephin
Copy link
Contributor

@dnephin dnephin commented Oct 17, 2022

Without this migration we can't list grants because it fails to load a nil into an int64.

The test added in this PR fails with the following when the migration implementation was missing:

sql: Scan error on column index 0, name "update_index": converting NULL to int64 is unsupported

It passes with the new migration

Without this migration we can't list grants because it fails to load a nil into an int64.
@dnephin dnephin force-pushed the dnephin/fix-default-update-index branch from be55660 to df8819e Compare October 17, 2022 17:02
@dnephin
Copy link
Contributor Author

dnephin commented Oct 17, 2022

I updated the default value to 2. We return a Last-Update-Index=1 when there are no results, so that the client doesn't need to know about this special case. It can keep pass us the header value and it will block.

By using a value of 2 a client that passed Last-Update-Index=1 will still receive all the grants that existed before the migration.

@dnephin dnephin merged commit 2fc594d into main Oct 17, 2022
@dnephin dnephin deleted the dnephin/fix-default-update-index branch October 17, 2022 17:27
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.

3 participants