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

[CLIENT-2196] Add missing batch policies to client config #495

Merged
merged 9 commits into from
Aug 28, 2023

Conversation

juliannguyen4
Copy link
Collaborator

@juliannguyen4 juliannguyen4 commented Aug 22, 2023

Docs: https://aerospike-python-client--495.org.readthedocs.build/en/495/aerospike.html#client-configuration

Build wheels: https://github.com/aerospike/aerospike-client-python/actions/runs/5969042908

Valgrind

Stage branch: https://github.com/aerospike/aerospike-client-python/actions/runs/5969045150/job/16194118766
This branch: https://github.com/aerospike/aerospike-client-python/actions/runs/5969044645

jnguyen@as-PF3WN8Y6:~/aerospike/aerospike-client-python$ diff <(grep Aerospike stage.log | awk '{print $5}' | sort) <(grep Aerospike 'CLIENT-2196.log' | awk '{print $5}' | sort)
26,28d25
< AerospikeClient_Append
< AerospikeClient_Append
< AerospikeClient_Append
80c77
< AerospikeClient_Operate
---
> AerospikeClient_New
129a127
> AerospikeClient_Type_Init
212a211
> AerospikeException_New
225a225
> AerospikeQuery_Get_Partitions_status
233d232
< AerospikeScan_Get_Partitions_status

AerospikeClient_New:
Stage:
4 raise_exception
4 add_host

This branch:
5 raise_exception
4 add_host

Extra raise_exception leak caused by negative tests being added in this PR.

AerospikeClient_Type_Init (from same stack as AerospikeClient_New leaks)

AerospikeQuery_Get_Partitions_status doesn't seem related to this PR

@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2023

Codecov Report

Patch coverage: 91.78% and project coverage change: +0.05% 🎉

Comparison is base (961119b) 81.27% compared to head (681da59) 81.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage     #495      +/-   ##
==========================================
+ Coverage   81.27%   81.33%   +0.05%     
==========================================
  Files          98       98              
  Lines       14645    14717      +72     
==========================================
+ Hits        11903    11970      +67     
- Misses       2742     2747       +5     
Files Changed Coverage Δ
src/main/policy_config.c 90.24% <91.78%> (+0.68%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juliannguyen4 juliannguyen4 marked this pull request as ready for review August 24, 2023 23:27
Comment on lines +568 to +570
// For batch write, batch apply, and batch remove policies:
// Don't set expressions field since it depends on the client's
// serialization policy
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should note that the client level policies do not accept expressions in the docs at https://aerospike-python-client.readthedocs.io/en/latest/aerospike.html#client-config

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a docs preview at the top

Copy link
Contributor

@dwelch-spike dwelch-spike left a comment

Choose a reason for hiding this comment

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

Code LGTM but I think you should note that client level policies don't accept expressions in the docs. See my other comment.

Copy link
Contributor

@dwelch-spike dwelch-spike left a comment

Choose a reason for hiding this comment

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

LGTM

@juliannguyen4 juliannguyen4 merged commit d2034ce into stage Aug 28, 2023
@juliannguyen4 juliannguyen4 deleted the CLIENT-2196-missing-batch-policies branch August 28, 2023 22:12
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