Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HRCPP-124 MetadataValue created and lastused fields should be -1 for imm... #122

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/infinispan/hotrod/MetadataValue.h
Expand Up @@ -10,7 +10,7 @@ namespace hotrod {
class MetadataValue : public VersionedValue
{
public:
MetadataValue() : VersionedValue(), created(0), lifespan(-1), lastUsed(0), maxIdle(-1) {}
MetadataValue() : VersionedValue(), created(-1), lifespan(-1), lastUsed(-1), maxIdle(-1) {}

int64_t created;
int32_t lifespan;
Expand Down
4 changes: 3 additions & 1 deletion test/Simple.cpp
Expand Up @@ -99,7 +99,9 @@ int main(int argc, char** argv) {
cache.put(k3, v3);
// getWithMetadata
rv5 = cache.getWithMetadata(k3);
if (!rv5.first.get() || rv5.second.lifespan >= 0) {
if (!rv5.first.get()
|| rv5.second.lifespan >= 0 || rv5.second.created >= 0
|| rv5.second.maxIdle >= 0 || rv5.second.lastUsed >= 0) {
std::cerr << "getWithMetadata with immortal entry fail for " << k3 << std::endl;
return 1;
}
Expand Down