History log of /5.5.2/subjson/subdoc/ (Results 1 - 25 of 103)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v5.1.2
c30c3d4c27-Jun-2018 Dave Rigby <daver@couchbase.com>

MB-30278: Reset cached Path component strings before use

There is an error in the handling of escaped paths (those containing a
backtick `) in Path::convert_escaped, in how path compoent

MB-30278: Reset cached Path component strings before use

There is an error in the handling of escaped paths (those containing a
backtick `) in Path::convert_escaped, in how path compoents are
cached.

The Path class maintains a cache of std::string path components; to
reduce the memory allocation overhead of convert_escaped(). Between
each call to Path::parse() the Path object is reset via clear(),
marking in-use path components as available.

However, the state of these cached, available compoents is /not/ reset
- i.e. the strings' data carries over from the previous call. As a
result when cached component objects are re-used then
convert_escaped() ends up appending to a non-empty string.

For example, a multi-mutation request which attempts to add 3
dictionary elements those name contains a backtick (key1`, key2` &
key3`) results in:

[ RUN ] Subdoc/SubdocTestappTest.MB_30278_SubdocBacktickMultiMutation/0_JsonNo
/Users/dave/repos/couchbase/server/source/kv_engine/tests/testapp/testapp.cc:895: Failure
Value of: actual
Actual: "{\"key1`\":1,\"key1`key2`\":2,\"key1`key2`key3`\":3}"
Expected: expected_value
Which is: "{\"key1`\":1,\"key2`\":2,\"key3`\":3}"

Note how key2` is incorrectly transformed into key1`key2`.

Resolve the issue by resetting the component object states in
Path::clear(); before adding them to the cached list. As such they are
in a 'pristine' state for re-use.

Change-Id: Ic4225bef2d6bb70fb6185e3bc0ddd87270ce3672
Reviewed-on: http://review.couchbase.org/96175
Well-Formed: Build Bot <build@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

Revision tags: v5.0.0
85ed622c28-Mar-2017 olivermd <oliver.downard@couchbase.com>

MB-23522: Add support for setting Result match Loc

With the changes being made to memcached for MB-23522 we need a
facility to modify the result from non-subjson operations. This commit

MB-23522: Add support for setting Result match Loc

With the changes being made to memcached for MB-23522 we need a
facility to modify the result from non-subjson operations. This commit
allows outside parties to set the match location and m_newdoc of a
Result so that the existing subdoc infrastructure within memcached can
continue to be used.

As part of the change, m_newdoc has been changed to a std::array to
provide a bit more safety.

Change-Id: Iea340a24bd924637b1f51644e95d3ab42dd90249
Reviewed-on: http://review.couchbase.org/75862
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

80a9543e24-Mar-2017 Mark Nunberg <mnunberg@haskalah.org>

MB-23524: Allow non-ASCII characters in path

This fixes a bug where we were scanning for control characters using a
signed char rather than an unsigned type. This caused values above 0x7

MB-23524: Allow non-ASCII characters in path

This fixes a bug where we were scanning for control characters using a
signed char rather than an unsigned type. This caused values above 0x7f
to overflow and act as unsigned and would incorrectly be detected as
invalid characters.

Change-Id: Idfd23e1cc51d4bfb9abeee3cb2287771f218190e
Reviewed-on: http://review.couchbase.org/75689
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

e7ba1a0316-Aug-2016 Sergey Avseyev <sergey.avseyev@gmail.com>

Remove duplicated condition branch

Change-Id: Ifa0721eb51b708ed3672207135a7908e44687cd1
Reviewed-on: http://review.couchbase.org/66812
Reviewed-by: Mark Nunberg <mark.nunberg@couchba

Remove duplicated condition branch

Change-Id: Ifa0721eb51b708ed3672207135a7908e44687cd1
Reviewed-on: http://review.couchbase.org/66812
Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>

show more ...

121b39be19-Jul-2016 Mark Nunberg <mnunberg@haskalah.org>

add function to determine root type based on path/command

This will be needed when trying to determine the "baseline" type.

Change-Id: If78ce56d6eba89e9f540cd77f11a0bdfd5292393

add function to determine root type based on path/command

This will be needed when trying to determine the "baseline" type.

Change-Id: If78ce56d6eba89e9f540cd77f11a0bdfd5292393
Reviewed-on: http://review.couchbase.org/65958
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

e51529ef18-Jul-2016 Mark Nunberg <mnunberg@haskalah.org>

MB-20199: GET_COUNT: Count the size of objects

Change-Id: I8b9d25e66abccb91c229c916b47a543f8cb60000
Reviewed-on: http://review.couchbase.org/65902
Reviewed-by: Dave Rigby <daver@couc

MB-20199: GET_COUNT: Count the size of objects

Change-Id: I8b9d25e66abccb91c229c916b47a543f8cb60000
Reviewed-on: http://review.couchbase.org/65902
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

Revision tags: v4.5.0
65d3f05330-Mar-2016 Dave Rigby <daver@couchbase.com>

Remove unused Error::Code enumerations

Change-Id: I124d3fdbc66e06a49c7654a3ff2d59ce303b2fb6
Reviewed-on: http://review.couchbase.org/62155
Tested-by: buildbot <build@couchbase.com>

Remove unused Error::Code enumerations

Change-Id: I124d3fdbc66e06a49c7654a3ff2d59ce303b2fb6
Reviewed-on: http://review.couchbase.org/62155
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>

show more ...

4b8ca4d116-Feb-2016 Mark Nunberg <mnunberg@haskalah.org>

MB-18176: Optimize root-only append

This doesn't require a full scan of a potentially lengthy document.

Change-Id: Ida1c3db10df134482e61ba083077f5ab9bc01d10
Reviewed-on: http://

MB-18176: Optimize root-only append

This doesn't require a full scan of a potentially lengthy document.

Change-Id: Ida1c3db10df134482e61ba083077f5ab9bc01d10
Reviewed-on: http://review.couchbase.org/60065
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

3d8f744416-Feb-2016 Mark Nunberg <mnunberg@haskalah.org>

MB-18169: Refactor COUNTER error codes

Change-Id: Iaf0d833507d6f07da35e39bec38febd8c16c7760
Reviewed-on: http://review.couchbase.org/60051
Tested-by: buildbot <build@couchbase.com>

MB-18169: Refactor COUNTER error codes

Change-Id: Iaf0d833507d6f07da35e39bec38febd8c16c7760
Reviewed-on: http://review.couchbase.org/60051
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

f99261c816-Feb-2016 Mark Nunberg <mnunberg@haskalah.org>

Remove error code numeric values

These were initially written to correspond to the actual memcached
protocol (so they wouldn't need to be converted twice), but reality has
since show

Remove error code numeric values

These were initially written to correspond to the actual memcached
protocol (so they wouldn't need to be converted twice), but reality has
since shown things to be different.

Change-Id: I464022e88c235bc502e506a1da0d07a8629b6c78
Reviewed-on: http://review.couchbase.org/60050
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

64dbb0e116-Feb-2016 Mark Nunberg <mnunberg@haskalah.org>

Remove compat C symbols

Memcached (our only consumer thus far) no longer uses them

Change-Id: I22ebf337fb46034b0891493d814f152b7e5512f8
Reviewed-on: http://review.couchbase.org/

Remove compat C symbols

Memcached (our only consumer thus far) no longer uses them

Change-Id: I22ebf337fb46034b0891493d814f152b7e5512f8
Reviewed-on: http://review.couchbase.org/60049
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

2c682b4716-Dec-2015 Mark Nunberg <mnunberg@haskalah.org>

Fix wrong num_siblings calculation

Note that for some reason I can't make a test which fails with the old
code and succeeds with the new one; however I do remember running into
an is

Fix wrong num_siblings calculation

Note that for some reason I can't make a test which fails with the old
code and succeeds with the new one; however I do remember running into
an issue when *copying* the older code for something else.

Change-Id: Idc128797840172aa57cca971b5a17572c8756a66
Reviewed-on: http://review.couchbase.org/58399
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

9f2dfe6a16-Dec-2015 Mark Nunberg <mnunberg@haskalah.org>

Remove 'Match::has_key' field

This value can be implicitly determined by inspecting whether the actual
key is empty

Change-Id: Ia5f05d6d4cc4ea91975e2983fc986a8ebbb96071
Revi

Remove 'Match::has_key' field

This value can be implicitly determined by inspecting whether the actual
key is empty

Change-Id: Ia5f05d6d4cc4ea91975e2983fc986a8ebbb96071
Reviewed-on: http://review.couchbase.org/58398
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

aef8453a14-Dec-2015 Mark Nunberg <mnunberg@haskalah.org>

Refactor hkey/uescape code into common class

This will help us with the 'multi' implementation of things.

Change-Id: I5ded83976f19ffae9c840e87fac1a909279d7071
Reviewed-on: http:

Refactor hkey/uescape code into common class

This will help us with the 'multi' implementation of things.

Change-Id: I5ded83976f19ffae9c840e87fac1a909279d7071
Reviewed-on: http://review.couchbase.org/58396
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

4e1bf09f16-Dec-2015 Mark Nunberg <mnunberg@haskalah.org>

loc: add clear() function

Change-Id: Ic4630999500d541a52d5aea9820e21bc46354ae1
Reviewed-on: http://review.couchbase.org/58397
Tested-by: buildbot <build@couchbase.com>
Reviewed-b

loc: add clear() function

Change-Id: Ic4630999500d541a52d5aea9820e21bc46354ae1
Reviewed-on: http://review.couchbase.org/58397
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

9157758714-Dec-2015 Mark Nunberg <mnunberg@haskalah.org>

MB-17060: Replace assert with std::runtime_error

This replaces assert() calls with SUBDOC_ASSERT ones which in turn
attempt to throw a std::runtime_error with the same context informatio

MB-17060: Replace assert with std::runtime_error

This replaces assert() calls with SUBDOC_ASSERT ones which in turn
attempt to throw a std::runtime_error with the same context information
(as a string) so it 'looks' like an assertion, but can be caught.

Change-Id: Icba3baf767f4465dd64971a6c794488fd8c0e9a9
Reviewed-on: http://review.couchbase.org/57789
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

5a685f4414-Dec-2015 Mark Nunberg <mnunberg@haskalah.org>

Use jsonsl_path_match instead of jpr_match

The new function allows for smaller, simpler code in match.cc

I've also started moving away from the `is_arridx` variable in
jpr_compo

Use jsonsl_path_match instead of jpr_match

The new function allows for smaller, simpler code in match.cc

I've also started moving away from the `is_arridx` variable in
jpr_component_st, as this is implied by a `ptype` of JSONSL_PATH_NUMERIC
using the newer path_match semantics.

Change-Id: Iaae694d52d7caec44676007dd79a3d343c64557e
Reviewed-on: http://review.couchbase.org/57788
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

cfc6467511-Dec-2015 Mark Nunberg <mnunberg@haskalah.org>

match: remove unreachable line

Change-Id: I85920eb5186488a21e4c4e2e1d1d9e861aacd4f6
Reviewed-on: http://review.couchbase.org/57786
Well-Formed: buildbot <build@couchbase.com>
Rev

match: remove unreachable line

Change-Id: I85920eb5186488a21e4c4e2e1d1d9e861aacd4f6
Reviewed-on: http://review.couchbase.org/57786
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

fbf39f0e08-Dec-2015 Mark Nunberg <mnunberg@haskalah.org>

Add error description for DOC_ETOODEEP

Change-Id: I4df05a5aada0de16c37600c4a7bdc1cdd96341ab
Reviewed-on: http://review.couchbase.org/57591
Tested-by: buildbot <build@couchbase.com>

Add error description for DOC_ETOODEEP

Change-Id: I4df05a5aada0de16c37600c4a7bdc1cdd96341ab
Reviewed-on: http://review.couchbase.org/57591
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

cb6de48412-Nov-2015 Mark Nunberg <mnunberg@haskalah.org>

MB-16790: Disallow upsert with final array index component

This is never allowed, and results in a corrupted document.

Change-Id: I82f49c18be4bf02367e31af98a164253a657cae5
Revie

MB-16790: Disallow upsert with final array index component

This is never allowed, and results in a corrupted document.

Change-Id: I82f49c18be4bf02367e31af98a164253a657cae5
Reviewed-on: http://review.couchbase.org/57005
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

5579467b11-Nov-2015 Mark Nunberg <mnunberg@haskalah.org>

insert should return EINVAL if not passed an index

MISMATCH is reserved for dynamic mismatches against the actual document
contents, while EINVAL is determined without looking at the doc

insert should return EINVAL if not passed an index

MISMATCH is reserved for dynamic mismatches against the actual document
contents, while EINVAL is determined without looking at the document

Change-Id: I6671e86a612c5c0f0cb76752299ba020e66f83ac
Reviewed-on: http://review.couchbase.org/56919
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

23a2b7e503-Nov-2015 Mark Nunberg <mnunberg@haskalah.org>

MB-16695: Use mandatory JSON path escaping

Without path escaping we risk having invalid JSON. Additionally, some
sequences like '"' and '\"' might seem ambiguous (do they mean a literal

MB-16695: Use mandatory JSON path escaping

Without path escaping we risk having invalid JSON. Additionally, some
sequences like '"' and '\"' might seem ambiguous (do they mean a literal
escape-quote or just intend to place the quote). By restricting every
path component to be valid JSON we solve for inadvertently inserting bad
paths up the stack.

This commit also disables support for using \u-XXXX sequences in paths.
Despite them being valid JSON, they need to be normalized before they
are used in the parser. Support for u-escapes in paths will be present
when these escapes are properly normalized into utf8 within the path
parser.

Change-Id: Ia3c3bccf3b6e3006268635656d1c66ab4225a24f
Reviewed-on: http://review.couchbase.org/56617
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

886c2a5708-Oct-2015 Mark Nunberg <mnunberg@haskalah.org>

ADD_UNIQUE: Return error on multivalue and complex values

ADD_UNIQUE inspects its value as a single value using string comparison
with existing array values. More than a single value, or

ADD_UNIQUE: Return error on multivalue and complex values

ADD_UNIQUE inspects its value as a single value using string comparison
with existing array values. More than a single value, or non-primitive
values cannot be properly compared to existing values within the array
and should not be allowed as values.

Change-Id: I0b622be6caac8a1de973fb940e725774a3d09000
Reviewed-on: http://review.couchbase.org/55929
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

cc089f2124-Sep-2015 Mark Nunberg <mnunberg@haskalah.org>

Remove unused subdoc-util.h

This file contained a stub for ntohll which we don't end up actually
using

Change-Id: I368dbec75055fce584bb889614d35b1216b81070
Reviewed-on: http

Remove unused subdoc-util.h

This file contained a stub for ntohll which we don't end up actually
using

Change-Id: I368dbec75055fce584bb889614d35b1216b81070
Reviewed-on: http://review.couchbase.org/55515
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

9f0cd35911-Aug-2015 Mark Nunberg <mnunberg@haskalah.org>

Add constructors for Loc

Change-Id: I4ea8a590e2d5423f3fbafd449a5f8592ea446299
Reviewed-on: http://review.couchbase.org/54352
Tested-by: buildbot <build@couchbase.com>
Reviewed-by

Add constructors for Loc

Change-Id: I4ea8a590e2d5423f3fbafd449a5f8592ea446299
Reviewed-on: http://review.couchbase.org/54352
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

12345