Skip to content

Conversation

sfalvo-aerospike
Copy link

No description provided.

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.
Copy link
Contributor

@paul-brackin paul-brackin left a comment

Choose a reason for hiding this comment

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

Can we fix the pipeline failures?

@sfalvo-aerospike sfalvo-aerospike force-pushed the client-3777-gh-issue-63-get-ttl-behavior-fix branch from a3e2032 to 941d6e1 Compare September 29, 2025 23:51
@sfalvo-aerospike sfalvo-aerospike force-pushed the client-3777-gh-issue-63-get-ttl-behavior-fix branch from ac415c3 to dece2d8 Compare September 30, 2025 00:36
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.

2 participants