AQL insert with TTL expires in the past

Hi,

I’m trying to insert several records by using INSERT statements in aql tool and before inserting, I set RECORD_TTL to 7776000 (90 days). But when I get any of the inserted records in the application (Go codebase) and print out record.Expiration, I can see that the expiration is negative number and no matter how RECORD_TTL is set, the printed expiration stays the same except that it’s decreasing every second.

I use Aerospike 3.5.14.

Does anyone know what I can do here?

Thanks, Matic

Hi, sorry for the massively late response.

This looks to be a bug in the AQL tool. The client timeout works properly, will expire the record on time.

@maticz

Can you try with the latest aql tool (3.6.3) to verify the insertion is correct, and if yes, then verify if this is still an issue with the client? Thanks.

aql> SET OUTPUT JSON
aql> SET RECORD_PRINT_METADATA true
aql> SET RECORD_TTL 7776000
aql> insert into test.testset (PK,bin) values (200,20000)
OK, 1 record affected.

aql> select * from test.testset where PK=200
[
  {
    "digest": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
    "ttl": 7775992,
    "gen": 1,
    "bins": {
      "bin": 20000
    }
  }
]