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

Partial row updates in parallel #17861

Merged
merged 28 commits into from
Aug 27, 2018

Conversation

Ladas
Copy link
Contributor

@Ladas Ladas commented Aug 15, 2018

Parallel saving for both full and partial rows, ensured by DB atomic conditions.

@Ladas
Copy link
Contributor Author

Ladas commented Aug 15, 2018

@miq-bot assign @agrare
@miq-bot add_label enhancement

@Ladas
Copy link
Contributor Author

Ladas commented Aug 16, 2018

@agrare ok, all provider repos are green with this applied

@Ladas Ladas force-pushed the partial_row_updates_in_parallel branch from e3cd9ec to f97643e Compare August 16, 2018 09:28
@Ladas Ladas mentioned this pull request Aug 21, 2018
1 task
@miq-bot
Copy link
Member

miq-bot commented Aug 24, 2018

This pull request is not mergeable. Please rebase and repush.

Ladas added 22 commits August 27, 2018 09:13
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
Ladas added 6 commits August 27, 2018 09:13
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
@Ladas Ladas force-pushed the partial_row_updates_in_parallel branch from 20c27f2 to 4f3c6dc Compare August 27, 2018 07:13
@miq-bot
Copy link
Member

miq-bot commented Aug 27, 2018

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
15 files checked, 6 offenses detected

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

@agrare agrare merged commit a8b2145 into ManageIQ:master Aug 27, 2018
@agrare agrare added this to the Sprint 93 Ending Aug 27, 2018 milestone Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants