|
Ran
|
Jobs
1
|
Files
57
|
Run time
4s
|
Badge
README BADGES
|
push
travis-ci
fix infinite loop when there's an empty {} IndexParams Found originally by Abhishek Singh and Harsha Havanur in their experiments in reusing cbgt for an eventing prototype, and they found it's also reproducible using cbmirror. This bug crept in awhile ago when cbgt moved towards supporting a more natural style of index definition JSON, as opposed to the long-ago original "JSON encoded-in-a-string" misfire. This inprovement was implemented via some specialized UnmarshalJSON()/MarshalJSON() override methods (see defs_json.go). However, when an application like cbmirror (or the eventing prototype), happens to use an index params value that is an empty JSON object like {}... ...then the specialized UnmarshalJSON() method incorrectly parses that {} to null. This might be due to the behavior of how omitempty is handled. Later on, cbgt's planner tries to compare plans to see if there've been any changes, and the plan comparison function sees that "{}" is not equal to "null". So, the planner then schedules a re-planning ("something must have changed!"), leading to the high-CPU infinite loop of re-planning that was seen by Abhishek and Harsha. Change-Id: I20ef3358c Reviewed-on: http://review.couchbase.org/70709 Tested-by: Abhishek Singh <abhishek@couchbase.com> Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
6376 of 11278 relevant lines covered (56.53%)
26.71 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 213.1 | 0 |
56.53 |
Travis Job 213.1 |