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

MemoryMigrationSource execution order is wrong #253

Open
KopiasCsaba opened this issue Sep 4, 2023 · 2 comments
Open

MemoryMigrationSource execution order is wrong #253

KopiasCsaba opened this issue Sep 4, 2023 · 2 comments

Comments

@KopiasCsaba
Copy link

Dear author(s), thank you very much for this library.

I have just found a little bug in it, I'm using it as a library based on the example in the main README.md. So I was all right until I had migration_0, migration_1, migration_2 as ids, but upon reaching migration_10 it broke. So I'm guessing the ordering is the "naive" ordering, that results in something like this: 0,1,10,2,3,4.

So probably we'd need some kind of a natural sorting in here, and this might affect other sources too, I'm not sure.

Anyhow, for now I'll go with 0001, 0002, ..., 0010 to solve this, but thought to report it anyhow.

Cheers!

@rubenv
Copy link
Owner

rubenv commented Sep 4, 2023

As far as I can remember the numbers should be prefixes, otherwise it defaults to natural sorting indeed.

@KopiasCsaba
Copy link
Author

In my case, where I had these IDs:

  • migration_0
  • migration_1
  • migration_2
  • migration_3
  • migration_4
  • migration_5
  • migration_6
  • migration_7
  • migration_8
  • migration_9
  • migration_10

It wanted to execute them in the order of 0,1,10,2,3,4,5,6,7,8,9.

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

2 participants