Skip to content

Poco redis command set have a bug when you want to set nx ex or expireTime #3268

@mansky

Description

@mansky

see Poco/Redis/command.h 196 line, a function have define static Command set(const std::string& key, Int64 value, bool overwrite = true, const Poco::Timespan& expireTime = 0, bool create = true),but when I use this Command there is two bug;
1.in this function,someone write as " cmd << "PX" << expireTime.totalMilliseconds() ",but expireTime.totalMilliseconds() type is int64,and command is a string array,so we should convert int64 to string use NumberFormatter::format();
2.I found when use this command like " SET 111 2 NX PX 1000000 ",if key 111 don't exist;redis will return a result .its type is string.
but if key 111 have existed ; redis will return a result . its type is bulkstring.its value is nil. so this command will return two type of result.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions