-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Use batch processing in edit-widgets package #26164
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
Conversation
|
Size Change: +4.3 kB (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
|
This looks great to me!
Could you expand what this means? |
@TimothyBJacobs sure! The words "transaction" and "commit" usually characterize an atomic operation that either goes through or fails in its entirety. In this PR, however, a transaction may consists of multiple chunks which means it may partially fail so I'm not entirely comfortable with this vocabulary. I'm not saying we shouldn't do chunks - that's a useful automation. If the caller needs to save 21 entities and a single batch may only handle 20, then it's going to send two batch requests anyway. Handling that logic manually would be repetitive and prone to errors so it's good to have it baked in. And there transactions out there that may end up in a partially failed state too (MyISAM - I'm looking at you). I think I would be more comfortable with this if the chunks were called "transactions" and transactions were called something else. This way each transaction would be atomic, but the collection of transactions wouldn't. |
|
There we go, I updated the nomenclature to "batch" and "transaction". |
b40cf06 to
e36d90e
Compare
|
One issue I'm running into is that the Keying the |
|
@adamziel would you mind explaining the public API of the proposed package in the description or the README? |
…om:WordPress/gutenberg into update/data-layer-batch-requests-use-state
We don't evaluate nested defaults yet, so this caused errors.
…s already in progress
This PR updates the
edit-widgetspackage so that it saves the entities using batch processing against the correct API endpoints.Testing instructions TBD