Skip to content

put success with TTL=-1, but TTL value is null in tikv, should restrict ttl value >=0 #147

@seiya-annie

Description

@seiya-annie
  1. step
    @test
    public void putwithInvalidTTL() {
    if (!initialized) return;
    long ttl = -1;
    ByteString key = ByteString.copyFromUtf8("key_lt");
    ByteString value = ByteString.copyFromUtf8("value1");
    checkDelete(key);
    try {
    client.put(key, value, ttl);
    } catch (Exception e) {
    logger.info("put fail for error:" + e);
    }
    Long t = client.getKeyTTL(key);
    logger.info("current ttl of key is " + t);
    checkDelete(key);
    logger.info("done");
    }

  2. expect result:
    put fail with invalid ttl value

  3. current result:
    put successfully, and get back value is null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions