Client 3777 gh issue 63 get ttl behavior fix#69
Merged
Conversation
This patch introduces a PHP script in DEBUG-sfalvo where I am able to reproduce
the OP's issue. To do this, I needed to make a small adjustment to the Rust
binding code.
After speaking with Khosrow, he recommended adding a few utility methods to the
Expiration class ("We probably need a few methods in there, including
neverExpire() -> bool, serverDefault() -> bool in addition to inSeconds()
(in seconds should be an i64 that can be negative for the two above values.)).
For now, this is just a research branch; DO NOT merge into main.
This patch greatly simplifies the getTtl() logic in the original PHP Rust bindings. It turns out that the Aerospike server itself maintains the TTL on behalf of the client; there is no need for the PHP client to maintain CITRUSLEAF_EPOCH-relative timestamps. This is in line with both the C and Java clients, thus implying consistent behavior with Javascript and Python clients as well. The Expiration interface has been upgraded as well; it is fully backward compatible with previous code, but now has getters which allows software to query its current state. In addition to this change, a number of PHPUnit tests have been added which exercises the new behavior along with the Expiration type's new interface.
paul-brackin
requested changes
Sep 26, 2025
Contributor
paul-brackin
left a comment
There was a problem hiding this comment.
Can we fix the pipeline failures?
a3e2032 to
941d6e1
Compare
ac415c3 to
dece2d8
Compare
khaf
requested changes
Oct 1, 2025
Contributor
khaf
left a comment
There was a problem hiding this comment.
Needs an update to the aerospike-connection-manager/version.txt and Cargo.toml to v 1.4.0
Also introduces new test to repro and ensure this doesn't regress.
paul-brackin
approved these changes
Oct 2, 2025
Contributor
paul-brackin
left a comment
There was a problem hiding this comment.
Im not reviewing the auto-gend markup, but everything else look good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.