Details
-
Bug
-
Resolution: Incomplete
-
Major
-
None
-
None
-
None
-
None
-
1
Description
In current master, when using pillowfight setting an key prefix with -p leads to exceptions here:
libcouchbase/tools/cbc-pillowfight.cc |
|
1130
|
static void storeCallback(lcb_INSTANCE *instance, int, const lcb_RESPSTORE *resp)
|
1131
|
{
|
1132
|
InstanceCookie *cookie = InstanceCookie::get(instance);
|
1133
|
ThreadContext *tc = cookie->getContext();
|
1134
|
lcb_STATUS rc = lcb_respstore_status(resp);
|
1135
|
tc->setError(rc);
|
1136
|
updateStats(cookie, rc);
|
1137
|
|
1138
|
const char *p;
|
1139
|
size_t n;
|
1140
|
lcb_respstore_key(resp, &p, &n);
|
1141
|
string key(p, n);
|
1142
|
uint32_t seqno = std::stol(key);
|
Setting a non-numeric prefix e.g., "a" leads to:
libc++abi: terminating with uncaught exception of type std::invalid_argument: stol: no conversion
|
Setting a numeric, non-zero prefix (e.g., "1") leads to:
libc++abi: terminating with uncaught exception of type std::out_of_range: stol: out of range
|
It seems that the above snippet may need to strip the user-provided prefix before interpreting the key as a number.
This appears to be a regression, but the last-good build/version hasn't been determined.
Attachments
Issue Links
- duplicates
-
CCBC-1414 Bug with "cbc-pillowfight" - the parameter "-p" (--key-prefix) doesn't work
- Resolved