Skip to content

Conversation

@juliannguyen4
Copy link
Collaborator

@juliannguyen4 juliannguyen4 commented Aug 18, 2025

  • 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

Manual testing

  • Valgrind shows no memory errors or leaks
  • Build artifacts passes. Two failing jobs show no test failures, so not sure why they show up as errors
  • Massif usage looks the same

@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.25%. Comparing base (4aea102) to head (c4f699f).
⚠️ Report is 4 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #817      +/-   ##
==========================================
+ Coverage   82.45%   83.25%   +0.80%     
==========================================
  Files          99       99              
  Lines       14496    14347     -149     
==========================================
- Hits        11952    11945       -7     
+ Misses       2544     2402     -142     

☔ 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.

@juliannguyen4 juliannguyen4 changed the title [CLIENT-3106] Clean up dead code [CLIENT-3106] Remove dead code Nov 10, 2025
@juliannguyen4 juliannguyen4 marked this pull request as ready for review November 10, 2025 22:46
@juliannguyen4 juliannguyen4 changed the title [CLIENT-3106] Remove dead code [CLIENT-3106] Remove dead code in conversions.c Nov 10, 2025
Copy link
Collaborator

@DomPeliniAerospike DomPeliniAerospike left a comment

Choose a reason for hiding this comment

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

Left just one suggestion, everything else looks good.

as_list *l = as_list_fromval((as_val *)val);
if (l) {
PyObject *py_list = NULL;
if (cnvt_list_to_map) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since as_list_of_map_to_py_tuple_list is no longer used, you should also remove usage of cnvt_list_to_map variable.

cnvt_list_to_map is used in several function signatures, but shouldn't be necessary since as_list_of_map_to_py_tuple_list is removed.

There should be more dead code linked to cnvt_list_to_map.

If this is outside of the scope for this PR, then we should log a ticket for removing this and dead code which set this funciton parameter to true in order to reduce complexity when stepping through functions.

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 forgot to remove it, thanks for reminding me

Copy link
Collaborator

@DomPeliniAerospike DomPeliniAerospike 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
Copy link
Collaborator Author

no memory errors or leaks from changes
massif mem usage looks ok

@juliannguyen4
Copy link
Collaborator Author

Currently holding off on merging this because I noticed the server crashing in one macos arm64 job. I'd like to investigate this further, after IT upgrades the self hosted mac runners to macos 14

@juliannguyen4
Copy link
Collaborator Author

Build artifacts passes except for noise. I believe the server was crashing due to IT maintenance

@juliannguyen4 juliannguyen4 merged commit 3b457ef into dev Nov 18, 2025
127 of 130 checks passed
@juliannguyen4 juliannguyen4 deleted the CLIENT-3106-clean-up-dead-code branch November 18, 2025 20:54
DomPeliniAerospike added a commit that referenced this pull request Nov 18, 2025
* [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 <109386615+juliannguyen4@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
DomPeliniAerospike added a commit that referenced this pull request Nov 18, 2025
* [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 <109386615+juliannguyen4@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
DomPeliniAerospike added a commit that referenced this pull request Nov 18, 2025
* [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 <109386615+juliannguyen4@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

4 participants