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

Should MsSqlStreamStoreV3.Migrate populate [MaxAge] and [MaxCount]? #222

Open
michael-freidgeim-webjet opened this issue Dec 3, 2018 · 2 comments

Comments

@michael-freidgeim-webjet
Copy link

michael-freidgeim-webjet commented Dec 3, 2018

I've cloned master branch today and trying to migrate to MsSqlStreamStoreV3.
Schema has been updated to V3, but columns [MaxAge] and [MaxCount] have nulls.
When debugging, I found that after the line

   streamIds.IntersectWith(metadataStreamIds);

StreamIds becomes empty (it had 7671 entries).

Is it expected behaviour? Does new columns applicable only to MetadataSqlStreamIds and expected to be null for normal streams? Do you have any documentation explaining when metadata is created as separate row starting with "$$" ?

Also Schema version set to 3 at the beginning of Migrate method. This contradicts to

a data migration (copy any existing metadata into the columns). ... Migration is resumeable and idempotent.
From #140

If the migration will fail later, user will not be able to re-run migration (unless manually reset extended property). It will be better to change version as the last step of migration, only if all steps are successful.

@damianh
Copy link
Member

damianh commented Dec 4, 2018

Yes it should and thanks for giving it a try. Will look into the migration test and strengthen the validation.

Agreed with rest of your statement regarding migration recoverability.

@MNF
Copy link
Contributor

MNF commented Dec 6, 2018

We started to use new version and it gave huge performance improvements: from 90% CPU on Azure Database Server to 1% CPU.
I've also added to wiki https://github.com/SQLStreamStore/SQLStreamStore/wiki/Example-of-Migration-to-MsSqlStreamStoreV3

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

No branches or pull requests

3 participants