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

ordered insertMany incorrectly fails if an row has pre-execution error #1672

Open
hemidactylus opened this issue Nov 8, 2024 · 4 comments · May be fixed by #1778
Open

ordered insertMany incorrectly fails if an row has pre-execution error #1672

hemidactylus opened this issue Nov 8, 2024 · 4 comments · May be fixed by #1778
Assignees
Labels
Bug Something isn't working Feature - Tables Issue impacts the users of Tables To-Do

Comments

@hemidactylus
Copy link
Contributor

Symptom: insertMany on tables, when ordered=True and there's a faulty row in mid-list, does not insert even those coming prior to that one.

This is at odds with Collections (ordered=true), where the docs are inserted sequentially until the erroring one.

Also in that case the response has no "status" field at all.

(first reported here).

@Yuqi-Du Yuqi-Du self-assigned this Nov 11, 2024
@Yuqi-Du Yuqi-Du added the Bug Something isn't working label Nov 11, 2024
@hemidactylus
Copy link
Contributor Author

It was later clarified that if by "faulty row" one means "a row with a wrong type", then the fact that no insertions occur is by design: Tables do preemptive all-rows data validation and this is the expected behaviour.

@amorton amorton reopened this Nov 12, 2024
@amorton
Copy link
Contributor

amorton commented Nov 12, 2024

re-open as we are discussing

@amorton amorton self-assigned this Nov 12, 2024
@Yuqi-Du Yuqi-Du removed their assignment Nov 13, 2024
@amorton amorton added dec-hotfix Fixes for the feature/dec-hotfix branch Feature - Tables Issue impacts the users of Tables labels Nov 19, 2024
@Yuqi-Du Yuqi-Du self-assigned this Dec 9, 2024
@amorton amorton removed the dec-hotfix Fixes for the feature/dec-hotfix branch label Dec 10, 2024
@amorton
Copy link
Contributor

amorton commented Dec 10, 2024

moved out of the dec-hotfix because it is not a blocking problem, and though small the change is deep and I want to make sure we get it correct.

@amorton
Copy link
Contributor

amorton commented Dec 11, 2024

moved to To-Do because we are working on it.

@Yuqi-Du I think the fix is like you have, but simplier.

When the processing is sequential the only test is that we fail if the current attempt is in error state.

Also, I would like to have unit tests to test the behaviour OperationAttemptContainer

@amorton amorton changed the title ordered insertMany on tables does not insert anything if there's a bad row in the middle ordered insertMany incorrectly fails if an row has pre-execution error Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feature - Tables Issue impacts the users of Tables To-Do
Projects
None yet
3 participants