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

Watchers no longer fire in the order they're defined from v3.2.38 #7576

Closed
henribru opened this issue Jan 25, 2023 · 3 comments · Fixed by #7748
Closed

Watchers no longer fire in the order they're defined from v3.2.38 #7576

henribru opened this issue Jan 25, 2023 · 3 comments · Fixed by #7748
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working regression

Comments

@henribru
Copy link

henribru commented Jan 25, 2023

Vue version

v3.2.38-v3.2.45

Link to minimal reproduction

https://sfc.vuejs.org/#eNqVkctOwzAQRX9l8CZBSuI+WKAqrcoKPgCJjTdpMm0Cfsl2UqEo/84kRVUpEqILL2buPb6jmZ49WZt1LbIVy33pGhvAY2jtRuhGWeMC9OBwn8CxCGUNA+ydURAREQktdGm0D6D8AdajLY5eUEoDb8bJ6i66Hy303Wuj0LQhju9hvYFeaBiRrCtkiwQK9mxMtftEwYQeEpjPZrMJnTJjsiZwgY6ZRmImzSEWbO6DYOQe6AH8j1no6mZm6W5nHkJ9ZnJ+Wi8tloqAysoiIFUAeT3f9P20xWHIOVVTt9G2DdClylQo14KRLhhJOT/TLGGnK6WqsNm7N5ruOA0ivgUv2Oo02tijs421YHUI1q84b7X9OGSlUXxLGnetDnSrtDJqu8wW2fKRV40Pl/0MvUp3zhw9OkoULLn4nFOzQ5c61BU6dH+GXXl/BF5pv0LHzIEWy4YvNDjsBg==

Steps to reproduce

Observe the console output

What is expected?

The console output being (this is the output for <=v3.2.37):

1st
2nd
3rd
4th

What is actually happening?

The console output being:

1st
4th
3rd
2nd

System Info

System:
    OS: Linux 6.1 undefined
    CPU: (16) x64 AMD Ryzen 7 6800HS Creator Edition
    Memory: 841.05 MB / 27.10 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 16.13.1 - ~/.asdf/installs/nodejs/16.13.1/bin/node
    npm: 8.1.2 - ~/.asdf/installs/nodejs/16.13.1/bin/npm
  Browsers:
    Chromium: 109.0.5414.119
    Firefox: 109.0
  npmPackages:
    vue: ^3.2.45 => 3.2.45

Any additional comments?

No response

@wellrus
Copy link

wellrus commented Feb 1, 2023

So...
Is it bug?

@edison1105 edison1105 added the 🐞 bug Something isn't working label Feb 1, 2023
@LinusBorg
Copy link
Member

LinusBorg commented Feb 1, 2023

I assume this sort here is not stable since a change in 3.2.38 (78c199d):

queue.sort(comparator)

@edison1105
Copy link
Member

The root cause is: the findInsertionIndex function returns the same index when job.id is equal, resulting in a misordering of the jobs in the queue.

if (instance) job.id = instance.uid

this resulted in the same jobId

@sodatea sodatea added has PR A pull request has already been submitted to solve the issue ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. regression labels Mar 24, 2023
lumozx pushed a commit to lumozx/core that referenced this issue Oct 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working regression
Projects
None yet
5 participants