Skip to content

Conversation

@DomPeliniAerospike
Copy link
Collaborator

@DomPeliniAerospike DomPeliniAerospike commented Feb 5, 2024

Extra changes:

  • Docs: aerospike.set_log_handler(): add expected callback signature for parameter
  • aerospike.set_log_handler(): add support for accepting None parameter to remove current log handler
  • Add code example to show how to enable global-level logging
  • aerospike.set_log_level(): fix bug where passing in an invalid log level does not raise an exception. This was caused by a bad comparison between long and uint32_t where the latter gets converted to a long in 64-bit systems. This causes the exception to never get handled properly

TODO

  • potential memory leak in Aerospike_Set_Log_Handler where replacing an existing log handler will cause a ref count leak
  • Manually tested that bug was fixed by running build from dev branch against these new tests. dev build also creates TRACE log when creating client. LOG_LEVEL_OFF causes that TRACE log to show up, causing a test case failure
  • Address test failures with build from dev branch
  • Build artifacts passes
  • Valgrind shows no memory leaks or errors from PR
  • Massif memory usage looks ok

Docs

https://aerospike-python-client--572.org.readthedocs.build/en/572/aerospike.html#

Added support for None parameter in set_log_handler

Added a loggging example
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.55%. Comparing base (a4d6df4) to head (853f8b0).
⚠️ Report is 7 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #572      +/-   ##
==========================================
+ Coverage   83.31%   83.55%   +0.23%     
==========================================
  Files          99       99              
  Lines       14423    14438      +15     
==========================================
+ Hits        12017    12063      +46     
+ Misses       2406     2375      -31     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DomPeliniAerospike DomPeliniAerospike changed the base branch from stage to dev November 14, 2025 13:08
DomPeliniAerospike and others added 24 commits November 14, 2025 06:11
Added test coverage for missing coverage lines
* [CLIENT-3793] Remove macOS 13 support (#846)

* Auto-bump version to 18.1.0rc3.dev1 [skip ci]

* [CLIENT-3106] Remove dead code in conversions.c (#817)

- record_to_resultpyobject() was a helper function for client.batch_get_ops(), which is now removed.
- record_to_pyobject_cnvt_list_to_map() and as_list_of_map_to_py_tuple_list(): these were helper functions that were used before Python client version 2.1.3 to return the result of certain map operations. They are no longer used starting from Python client 2.1.3 and higher, so it is safe to remove
- bin_strict_type_checking() isn't used anywhere. But it would be good to consolidate the bin checking code into one place, since it is currently spread out all over the codebase
- as_batch_read_results_to_pyobject() was used by get_many() which has been removed
- batch_read_records_to_pyobject() was used by select_many() which has been removed

Extra Changes

Merge do_*_to_pyobject() methods into their calling methods, since they have the same function signature

* Auto-bump version to 18.1.0rc3.dev2 [skip ci]

---------

Co-authored-by: Julian Nguyen <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# Conflicts:
#	.github/workflows/stage-tests.yml
#	README.rst
#	VERSION
….set_log_level. Remove code example since we already have top level example
…p track of whether LOG_LEVEL_OFF is set to simplify
@juliannguyen4 juliannguyen4 changed the title CLIENT-2740 - Create an alternative to Python client's LOG_LEVEL_OFF [CLIENT-2740] Fix bug where LOG_LEVEL_OFF causes more logs to be produced Jan 28, 2026
@juliannguyen4 juliannguyen4 changed the title [CLIENT-2740] Fix bug where LOG_LEVEL_OFF causes more logs to be produced [CLIENT-2740] Fix bug where LOG_LEVEL_OFF causes more logs to be produced (as if LOG_LEVEL_TRACE was set) Jan 28, 2026
@juliannguyen4 juliannguyen4 removed their request for review January 29, 2026 17:55
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.

Looking good, mainly want to make sure that the custom logging handler ref counting is correct. See comments.

@juliannguyen4
Copy link
Collaborator

The sphinx linkcheck is failing due to false positives, not related to this PR

Co-authored-by: dwelch-spike <[email protected]>
@dwelch-spike dwelch-spike self-requested a review January 29, 2026 21:02
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 41af09e into dev Jan 29, 2026
31 of 32 checks passed
@juliannguyen4 juliannguyen4 deleted the CLIENT-2740 branch January 29, 2026 21:04
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.

5 participants