Details
-
Bug
-
Resolution: Fixed
-
Critical
-
3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4
-
1
Description
In our 50/50 read/write KV throughput tests that use collections, we have been seeing very large regressions with LCB 3.2.3 and also LCB 3.2.4. For example: http://showfast.sc.couchbase.com/#/runs/kv_max_ops_balanced_512_1000s_1000c_ares/7.1.0-1695
Some testing confirms that it is a regression introduced with LCB 3.2.0, and is different to the regression that led to CCBC-1515 (which was fixed in LCB 3.2.4). The following three runs demonstrate this:
LCB Version | Throughput | Jenkins build |
---|---|---|
3.1.3 | 2,992,158 | http://perf.jenkins.couchbase.com/job/ares-dev/97/ |
3.2.0 | 419,824 | http://perf.jenkins.couchbase.com/job/ares-dev/98/ |
3.2.4 | 974,548 | http://perf.jenkins.couchbase.com/job/ares-dev/96/ |
It would appear that the issue is similar to that in CCBC-1515, wherein we are using std::stringstream somewhat unnecessarily. This time it looks like the culprit is in collection_qualifier.hh:
https://github.com/couchbase/libcouchbase/blob/master/src/capi/collection_qualifier.hh#L51
Changing the construction of spec_ to use simple string appending instead of a stringstream would help, given that the collection_qualifier is used for every KV operation when using collections. This quickbench link demonstrates that it would be worth doing this:
https://quick-bench.com/q/W-yAn-1scyinkDlyd-yKFvSUdhc
I fully understand this is something I should have found when investigating CCBC-1515, so I apologise that this can now only be fixed for LCB 3.2.5.
Attachments
For Gerrit Dashboard: CCBC-1525 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
167383,2 | CCBC-1525: remove stringstream in collection_qualifier | master | libcouchbase | Status: MERGED | +2 | +1 |