-
Notifications
You must be signed in to change notification settings - Fork 47
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
[FIX] evaluation: Ensure dependency invalidation for array formulas #5209
Conversation
c31bc5f
to
c57d35e
Compare
How to reproduce: -> see the attached test What is happening? During the evaluation of SUMIFS, it will fetch its ranges. First it will first fetch an empty range (E4:E7) since MUNIT hasn't been evaluated yet. Afterwards, it will fetch H4, which in turn will request C4 and therefore force the evaluation of the spreaded function MUNIT. AT this point, there is a disparity of values because the values of the range (E4:E7) have changed. To address those situations, the evaluator invalidates the dependencies of all the spreaded zone. Which means marking A1 to be recomputed. Unfortunately, A1 is still being evaluated and since #4589 (specifically commit 8d22e86) we remove the cell from the queue after we evaluted it. This revision changes the approach taken in 8d22e86 to allow legitimate invalidations take place while avoiding useless reevaluations. Task: 4252800
84d917d
to
ec22cf3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
robodoo r+
@rrahir @LucasLefevre because this PR has multiple commits, I need to know how to merge it:
|
robodoo rebase-ff |
Merge method set to rebase and fast-forward. |
How to reproduce: -> see the attached test What is happening? During the evaluation of SUMIFS, it will fetch its ranges. First it will first fetch an empty range (E4:E7) since MUNIT hasn't been evaluated yet. Afterwards, it will fetch H4, which in turn will request C4 and therefore force the evaluation of the spreaded function MUNIT. AT this point, there is a disparity of values because the values of the range (E4:E7) have changed. To address those situations, the evaluator invalidates the dependencies of all the spreaded zone. Which means marking A1 to be recomputed. Unfortunately, A1 is still being evaluated and since #4589 (specifically commit 8d22e86) we remove the cell from the queue after we evaluted it. This revision changes the approach taken in 8d22e86 to allow legitimate invalidations take place while avoiding useless reevaluations. Task: 4252800 Part-of: #5209 Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
The evaluation of splillable function is complex and required some bugfix over time. Some of the bugfixes have some side effects difficult to assess and a specific one is the introduction of infinite in the evaluation which are hidden behind a ceiling of iterations. While infinite loops can occur in very specific cases, they are not common and it makes sense to detect them to spot undesired behaviours. This revision adds a log in debug mode to avoid spam to capture the attention of the developper. closes #5209 Task: 4252800 Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
robodoo r- |
there's a test which is console.debugging (most probably the test testing there's a max number of iterations. |
5454a99
to
42c1983
Compare
The evaluation of splillable function is complex and required some bugfix over time. Some of the bugfixes have some side effects difficult to assess and a specific one is the introduction of infinite in the evaluation which are hidden behind a ceiling of iterations. While infinite loops can occur in very specific cases, they are not common and it makes sense to detect them to spot undesired behaviours. This revision adds a log in warn mode to capture the attention of the developper. Task: 4252800
setCellContent(model, "A1", "=MFILL(2,1,D1+1)"); | ||
setCellContent(model, "C1", "=MFILL(2,1,B1+1)"); | ||
expect(getEvaluatedCell(model, "A1").value).toBe(31); | ||
expect(getEvaluatedCell(model, "B1").value).toBe(31); | ||
expect(getEvaluatedCell(model, "C1").value).toBe(30); | ||
expect(getEvaluatedCell(model, "D1").value).toBe(30); | ||
expect(spy).toHaveBeenCalledWith("Maximum iteration rea ched while evaluating cells"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
expect(spy).toHaveBeenCalledWith("Maximum iteration rea ched while evaluating cells"); | |
expect(spy).toHaveBeenCalledWith("Maximum iteration reached while evaluating cells"); |
42c1983
to
a7ab544
Compare
robodoo r+ |
How to reproduce: -> see the attached test What is happening? During the evaluation of SUMIFS, it will fetch its ranges. First it will first fetch an empty range (E4:E7) since MUNIT hasn't been evaluated yet. Afterwards, it will fetch H4, which in turn will request C4 and therefore force the evaluation of the spreaded function MUNIT. AT this point, there is a disparity of values because the values of the range (E4:E7) have changed. To address those situations, the evaluator invalidates the dependencies of all the spreaded zone. Which means marking A1 to be recomputed. Unfortunately, A1 is still being evaluated and since #4589 (specifically commit 8d22e86) we remove the cell from the queue after we evaluted it. This revision changes the approach taken in 8d22e86 to allow legitimate invalidations take place while avoiding useless reevaluations. Task: 4252800 Part-of: #5209 Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
The evaluation of splillable function is complex and required some bugfix over time. Some of the bugfixes have some side effects difficult to assess and a specific one is the introduction of infinite in the evaluation which are hidden behind a ceiling of iterations. While infinite loops can occur in very specific cases, they are not common and it makes sense to detect them to spot undesired behaviours. This revision adds a log in warn mode to capture the attention of the developper. closes #5209 Task: 4252800 Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
How to reproduce:
-> see the attached test
What is happening?
During the evaluation of SUMIFS, it will fetch its ranges. First it will first fetch an empty range (E4:E7) since MUNIT hasn't been evaluated yet.
Afterwards, it will fetch H4, which in turn will request C4 and therefore force the evaluation of the spreaded function MUNIT.
AT this point, there is a disparity of values because the values of the range (E4:E7) have changed.
To address those situations, the evaluator invalidates the dependencies of all the spreaded zone. Which means marking A1 to be recomputed.
Unfortunately, A1 is still being evaluated and since #4589 (specifically commit 8d22e86) we remove the cell from the queue after we evaluted it.
This revision changes the approach taken in 8d22e86 to allow legitimate invalidations take place while avoiding useless reevaluations.
Task: 4252800
Description:
description of this task, what is implemented and why it is implemented that way.
Task: TASK_ID
review checklist