-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(files): handle multidimensional arrays in scanner #43794
Conversation
Another potential approach: iterating over each element in the
|
This comment was marked as resolved.
This comment was marked as resolved.
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.
I tried this fix on my instance and it works. no more error logs from array_diff_assoc
.
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.
Thanks for the investigation and lengthy explanation. It makes sense IMO. :)
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
ecd52e6
to
e70375b
Compare
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as resolved.
This comment was marked as resolved.
I'm not a fan of round-tripping data through serialize if we can avoid it |
Sorry, if this in the wild, I just skimmed through the code. Is it really worthwhile to only updating the diff? |
This comment was marked as outdated.
This comment was marked as outdated.
Is this patch slated to release for version 30 or any minor patches for 29? |
0c018d5
to
6ff46ab
Compare
Reimplemented w/o serialization. Tests reasonably in my test bed. Mostly housekeeping items left.
It'll likely make it into the next monthly maintenance releases for v27/v28/v29 (well before v30 is formally published). |
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.
This code has been running on my instance for the past 12h and not a single line of error has raised, it works fine 👍
afa43e0
to
1c515bf
Compare
/backport to stable29 |
/backport to stable28 |
Fixes #43408 Signed-off-by: Josh <josh.t.richards@gmail.com>
1c515bf
to
3c3e45f
Compare
occ files:scan
#43408Summary
array_diff_assoc()
doesn't support multidimensional arrays on its own (and, when attempted, it internally casts any embedded array elements to strings to attempt to compare them - not only generating warnings like "Array to string conversion" but also then overlooking differences).But sometimes we're passing it a multidimensional array.
I think the reason this became a new problem in v28 is because the
metadata
(#40761 / etc) gets embedded as a second level array here. It happens that triggering a scan on an Object Store is one way to trigger this code path just right to see the behavior found in #43408. (In other words: there may be other cases where an n-level array ends up here, but I don't know of one off-hand; and this should accommodate any of them in any case).TODO
Checklist