-
Notifications
You must be signed in to change notification settings - Fork 897
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
Partial row updates in parallel #17861
Partial row updates in parallel #17861
Conversation
@agrare ok, all provider repos are green with this applied |
e3cd9ec
to
f97643e
Compare
This pull request is not mergeable. Please rebase and repush. |
Allow skeletal_index to be serializable
Use :timestamp for the full row parallel update check
Allow skeletal_index objects to be updated
Expose data iterator into skelatal index
A basic version of partial updates. Merged with skeletal precreate. The performance is not the best, but it is the base for passing specs.
Saving partial after full plus specs passing
Timestamps are set correctly when combining different partials
Correct update for full after partial with nullifying of the partial update timestamps
Use supports_timestamps_max for conditionalization of the entire path
Skeletonize full row if it fails timestamp check, so it is able to save partial row that is still valid.
Make full to partial transformation also for the upsert path. Plus the skeletonize must preserve the inventory_object
Building 2 partial InventoryObjects merges them according to timestamps
Fix assign attributes being too strict for the full rows
Don't do partial updates if timestamp is missing
Check timestamp before updating, to avoid extra query
Update TODO about timestamp, we wil lrequire timestamp for the partial update
Proper parallel_safe? conditions, so we don't break existing code
Rename timestamp to resource_timestamp, and following that renaming to resource_timestamps and resource_timestamps_max
Sometimes we have base STI and we are defining sub STIs in parser. In this case the skeletal precreate will create the record with base STI, so we need to be able to update it later, by full refresh of the target, having the right STI.
resource_version should work the same as resource_timestamp, while one is integer and other is timestamp
Fill correct created and updated result of IC
Cleanup TODos ans YARD
Cleanup sql_helper and separate to upsert and update mixins
Fix rubocop issues
Inventory collection logging is bad
Quote every column name plus cleanup of update query
Store integer in resource_versions jsonb
Add timestamp conditions only for parallel safe strategy
20c27f2
to
4f3c6dc
Compare
Checked commits Ladas/manageiq@4b4d106~...4f3c6dc with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 app/models/manager_refresh/inventory_collection/index/type/data.rb
app/models/manager_refresh/save_collection/saver/concurrent_safe_batch.rb
app/models/manager_refresh/save_collection/saver/sql_helper_upsert.rb
|
Parallel saving for both full and partial rows, ensured by DB atomic conditions.