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

Delete exceeding versions when adding a new alias #1352

Merged
merged 1 commit into from
Feb 5, 2018

Conversation

AymericDu
Copy link
Member

See #1163

@codecov-io
Copy link

codecov-io commented Feb 2, 2018

Codecov Report

Merging #1352 into 4.x will increase coverage by 0.76%.
The diff coverage is 85.07%.

Impacted file tree graph

@@            Coverage Diff            @@
##              4.x   #1352      +/-   ##
=========================================
+ Coverage   77.85%   78.6%   +0.76%     
=========================================
  Files         300     300              
  Lines       55797   55857      +60     
  Branches     6480    6485       +5     
=========================================
+ Hits        43435   43901     +466     
+ Misses      12014   11950      -64     
+ Partials      348       6     -342
Impacted Files Coverage Δ
...ests/functional/content/test_content_versioning.py 100% <100%> (ø) ⬆️
tests/unit/test_meta2_backend.c 100% <100%> (ø) ⬆️
oio/common/easy_value.py 67.5% <18.19%> (-18.7%) ⬇️
meta2v2/meta2_backend.c 79.26% <40%> (ø) ⬆️
meta2v2/meta2_filters_action_content.c 93.88% <83.34%> (+3.32%) ⬆️
meta2v2/meta2_utils.c 80.68% <88.75%> (-0.08%) ⬇️
core/http_put.c 92.63% <0%> (-0.5%) ⬇️
metautils/lib/utils_sockets.c 41.18% <0%> (-0.39%) ⬇️
cluster/module/server.c 79.37% <0%> (-0.1%) ⬇️
core/lb.c 93.74% <0%> (+0.15%) ⬆️
... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8196f72...f336907. Read the comment docs.

self.api.object_create(self.account, self.container,
obj_name="versioned", data="content3")
new_oldest_version = check_num_objects_and_get_oldest_version(3)
self.assertNotEqual(oldest_version, new_oldest_version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use self.assertLess(oldest_version, new_oldest_version).

deleted_beans = NULL;
err = _real_delete_and_save_deleted_beans(sq3, beans, alias,
header, _bean_list_cb, &deleted_beans);
cb(u0, deleted_beans);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can pass cb directly to _real_delete_and_save_deleted_beans, don't we?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cb loads a bean list into a list. So _real_delete_and_save_deleted_beans creates this bean list.

@AymericDu AymericDu closed this Feb 2, 2018
@AymericDu AymericDu reopened this Feb 2, 2018
@AymericDu AymericDu force-pushed the delete-exceeding-versions branch 2 times, most recently from 428e293 to 58bf77e Compare February 2, 2018 17:06
@fvennetier fvennetier merged commit b4a9863 into open-io:4.x Feb 5, 2018
@AymericDu AymericDu deleted the delete-exceeding-versions branch February 9, 2018 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants