Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Feb 27, 2015
  1. Volker Mische

    MB-13502 Get view name from indexer specific record

    vmx authored vmx committed
    Change-Id: I06d6638642dc8be576103246294b67873c0f1e28
    Reviewed-on: http://review.couchbase.org/47182
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
Commits on Feb 23, 2015
  1. Volker Mische

    MB-13125: Make multiple emits with same key possible

    vmx authored vmx committed
    Spatial views now support multiple emits with the same key. An example
    would be an application where you emit all things that are located at
    a single address (point). This address would have a restaurant at the
    ground floor and a marketing agency above.
    
        var key = [doc.lon, doc.lan];
        emit(key, "restaurant");
        emit(key, "marketing agency");
    
    Change-Id: I62843399e6e915c9efe06471270c292e0d6d6f85
    Reviewed-on: http://review.couchbase.org/45977
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
Commits on Feb 20, 2015
  1. Volker Mische

    Use the discovered dialyzer

    vmx authored vmx committed
    Instead of expecting to have dialyzer in the search path, use the
    path that CMake discovered.
    
    Change-Id: Idd60ca05064216c603c135a059777c37b5b6c470
    Reviewed-on: http://review.couchbase.org/47083
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
Commits on Feb 3, 2015
  1. Volker Mische

    MB-13125: Use indexer specific function

    vmx authored vmx committed
    The `view_insert_doc_query_results/6` was moved into the indexer
    specific module, hence the spatial views need an implementation of
    it.
    
    This is a preparation to support emitting several values with the same
    key in spatial views.
    
    Change-Id: Ic3e89bb28f54d14659c160174beff5409f1d5421
    Reviewed-on: http://review.couchbase.org/45976
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
  2. Volker Mische

    Add test for multiple emits

    vmx authored vmx committed
    Within a spatial view function you can call emit more than once.
    
    Change-Id: Ib8da46015939d46ef4c577385ce018c72c078a05
    Reviewed-on: http://review.couchbase.org/45458
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
Commits on Jan 28, 2015
  1. Volker Mische

    MB-13084: Use `couch_set_view_updater` module

    vmx authored vmx committed
    Instead of having our own implementation of the
    `index_builder_wait_loop`, share a single one with the mapreduce
    views.
    
    Change-Id: Ic73469efb9366d606a495bb7fd4223c115305fb8
    Reviewed-on: http://review.couchbase.org/45457
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
Commits on Jan 23, 2015
  1. Volker Mische

    MB-13192: Use the escript found by CMake

    vmx authored vmx committed
    Instead of relying `escript` to be set via `PATH` correctly, use
    the `escript` that was found by CMake (`${ESCRIPT_EXECUTABLE}`).
    
    Change-Id: I406276998dab802613d5859ce8ee0c8b4c734834
    Reviewed-on: http://review.couchbase.org/45783
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
Commits on Jan 22, 2015
  1. Volker Mische

    MB-13084: `#writer_acc{}` record is no longer used

    vmx authored vmx committed
    The spatial views code no longer needs access to `#writer_acc{}` record
    which is used internally in the `couch_set_view_updater` module.
    
    Change-Id: Ib304a80ae8c8c4c041a4e724a3ff9d2f8730978c
    Reviewed-on: http://review.couchbase.org/45456
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
  2. Volker Mische

    MB-13084: Implement `view_name/2`

    vmx authored vmx committed
    The updater needs the `view_name/2` function for a proper error
    message.
    
    Change-Id: Id87df97eab147866768cba6e9733bcc26aacae2e
    Reviewed-on: http://review.couchbase.org/45455
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
  3. Volker Mische

    MB-13084: Remove no longer needed callbacks

    vmx authored vmx committed
    Some callbacks are no longer needed after a lot of code from the
    couch_set_views was moved into Couchstore.
    
    Change-Id: Ia5ad3c3487cadcbc0d29da2939139875df6b7d05
    Reviewed-on: http://review.couchbase.org/45454
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
Commits on Jan 16, 2015
  1. Volker Mische

    CBIDXT-253: Encode geometries as WKB (Well-Known Binary)

    vmx authored vmx committed
    The geometries were stored as Erlang terms on disk. This is bad for
    interoperability. The geometries are now stored as WKB (Well-Known Binary).
    
    Change-Id: I41b8cf811ee9e4382a0a0b4e49913496a5d329cb
    Reviewed-on: http://review.couchbase.org/45342
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    Tested-by: buildbot <build@couchbase.com>
  2. Volker Mische

    CBIDXT-253: Build the wkb library

    vmx authored vmx committed
    Use CMake to build the wkb library.
    
    Change-Id: I3f3b7e53432b54da60991850b6fc3edc5c040489
    Reviewed-on: http://review.couchbase.org/45341
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
  3. Volker Mische

    CBIDXT-253: Add wkb library

    vmx authored vmx committed
    Add the wkb library in order to encode geometries as Well-Known Binary (WKB).
    
    The library was originally a WKB writer only and created by Cloudant. It's
    licensed under the Apache License 2.0.
    
    I extended it with a WKB reader.
    
    This commit includes the full library, but without the build system, as it
    originally uses rebar, but Couchbase uses CMake.
    
    Change-Id: I04096132ed7d559bf7dd0ec6d5b137c804e249ca
    Reviewed-on: http://review.couchbase.org/45340
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
Commits on Jan 14, 2015
  1. Volker Mische

    Use existing function (DRY)

    vmx authored vmx committed
    There is already a function to decode the MBB, use that one
    instead of re-implementing it.
    
    Change-Id: If9405e1952bfb7f98d10409a23526cdbf5add8f6
    Reviewed-on: http://review.couchbase.org/45087
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
  2. Volker Mische

    CBIDXT-255: Add tests for compaction

    vmx authored vmx committed
    Change-Id: I15a1a6ad7f0b69c3610e57d43f1be468dd213da8
    Reviewed-on: http://review.couchbase.org/45093
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  3. Volker Mische

    MB-12903: Update the spatial view from the tmp files

    vmx authored vmx committed
    The spatial view files are not updated from the temporary files the
    updater writes to disk. This is similar to the way the mapreduce views
    work. The difference is that the spatial views are still updated from
    Erlang and not with the C-based native updater.
    
    Change-Id: I212c0d1a0110558e805accecb3a5940667d60744
    Reviewed-on: http://review.couchbase.org/44386
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Nimish Gupta <nimish@couchbase.com>
Commits on Jan 8, 2015
  1. Volker Mische

    MB-12903: Implementation of `convert_back_index_kvs_to_binary/2`

    vmx authored vmx committed
    Adding an implementation of `convert_back_index_kvs_to_binary/2` that the
    updater can use. It's very similar to the mapreduce view implementaiton
    except for the key encoding.
    
    Change-Id: I24d16421a3489f6127d4c72bc4c18f3382db0047
    Reviewed-on: http://review.couchbase.org/44385
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  2. Volker Mische

    MB-12903: Implement functions for updater

    vmx authored vmx committed
    The index updater needs some indexer specific function. This commit
    implements and exports such function.
    
    Change-Id: Ifcc679b0c4c0553c4d98b106a2b3ebc6f5ccb746
    Reviewed-on: http://review.couchbase.org/44384
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  3. Volker Mische

    MB-12903: Make key encoding more uniform

    vmx authored vmx committed
    The returned keys from `calc_mbb/1` were a flat list of doubles, which is
    never the case in other places of the code. The key is either a list of
    2-tuples to 2-element lists containing doubles. Hence change to the commonly
    used format of a list of 2-element lists containing doubles.
    
    Change-Id: If3172be587a3e5c96a120edde1b04c4d50de96e8
    Reviewed-on: http://review.couchbase.org/44383
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Jan 7, 2015
  1. Volker Mische

    Add type spec for `maybe_process_key/1`

    vmx authored vmx committed
    Change-Id: If70a96340a024199bda6ee0bdef2b0700827b799
    Reviewed-on: http://review.couchbase.org/44382
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
Commits on Dec 9, 2014
  1. Volker Mische

    MB-12852: Re-introduce _info handler

    vmx authored vmx committed
    To get information about a spatial view group/design document there is
    now the per node `_info` handler at
    `/_spatial_view/bucketname/_design/designname/_info`. It should be used
    for debugging purpose only as it is an expensive call.
    
    Change-Id: I1102211653d4ed26ae40823a0db071a1df1cd1bc
    Reviewed-on: http://review.couchbase.org/43960
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  2. Volker Mische

    MB-12852: Return correct disk size

    vmx authored vmx committed
    The function to return the correct disk size in the `_info` handler
    wasn't yet implemented.
    
    Change-Id: I0ffca9b281f9c473628165127709377f8d077cb5
    Reviewed-on: http://review.couchbase.org/44106
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
  3. Volker Mische

    MB-12852: Return correct result from view info

    vmx authored vmx committed
    The root node might be empty or the key on the root node might not be
    set, hence the MBB needs to be calculated differently.
    
    Change-Id: Ifd4b3752491e602b263a7a5c929dc1534fae3790
    Reviewed-on: http://review.couchbase.org/44105
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  4. Volker Mische

    MB-12819: Change signature calculation of spatial views

    vmx authored vmx committed
    The spatial views now also take the name of the spatial view function
    into account (just like mapreduce views). When you change the name of
    the function and not the function itself, the view signature will still
    change and the view will be re-created.
    
    Re-sorting of the view functions within the JSON object won't change
    the function signature.
    
    Change-Id: Ifbe16f9ef2d40eebc6c583aa281e0df6de9e2ad0
    Reviewed-on: http://review.couchbase.org/43838
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
Commits on Nov 20, 2014
  1. Artem Stemkovski Aliaksey Kandratsenka (aka Aliaksei Kandratsenka)

    MB-8872 allow ns_server to implement auth for _spatial_merge handler

    vzasade authored alk committed
    needed for http://review.couchbase.org/43428/
    
    Change-Id: I2f0900459269746a51819478285e19fd02b56804
    Reviewed-on: http://review.couchbase.org/43429
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Nov 7, 2014
  1. Volker Mische

    Make split candidate creation non-fatal

    vmx authored vmx committed
    There are cases when there is no split cases, due to the maximum chunk
    threshold. It can happen when a single node is bigger than that threshold.
    Instead of having a fatal error, create a node that is bigger than that
    maximum threshold. This is a trade-off to make. It's better to have a
    running system with potentially nodes that are bigger than defined, rather
    than a hard crash where no further inserts are possible.
    
    Change-Id: Ic0e4149a5ff967c4e0378532fefdec34b8cf5e05
    Reviewed-on: http://review.couchbase.org/42903
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  2. Volker Mische

    MB-12251: Make inserts into vtree more robust

    vmx authored vmx committed
    When inserting several nodes at the same time, the code contained a
    special case when the size of the nodes to be inserted was larger than
    the maximum threshold, but still less than two times the threshold.
    
    The idea for this special case was that the normal split algorithm could
    be used. This assumption was wrong, as it could well be that no valid
    split candidate can be found. This resulted in the fatal error
    "No split candidates found. Increase the chunk threshold.".
    
    Hence that special case got removed.
    
    This commits also adds a test that would fail with the old logic. Some
    other tests used that spatial case also needed to adapted.
    
    Change-Id: Ia4f9e416d5b7b7f27937c7fc9d2a967352d1e6c9
    Reviewed-on: http://review.couchbase.org/42896
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  3. Volker Mische

    Make test logging more verbose

    vmx authored vmx committed
    With the `--verbose` set the test logging output is more verbose.
    The output on the screen is still the same it only changes what
    gets written to the log file.
    
    Change-Id: Id93658c0c683941e0f3bfb38cd8e9af29929f8c6
    Reviewed-on: http://review.couchbase.org/42895
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Commits on Nov 6, 2014
  1. Volker Mische

    MB-12251: Use the common function to parse the query parameters

    vmx authored vmx committed
    Instead of extracting the stale and debug parameter manually, use the
    existing parse function to get the parameters. This makes things less
    fragile and error prone.
    
    Change-Id: I4949447dd37305531bc41bde78d0e0424e5b4d00
    Reviewed-on: http://review.couchbase.org/42761
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  2. Volker Mische

    MB-12251: Throw error when only `start_range` or `end_range` is given

    vmx authored vmx committed
    You need to supply both, `start_range` and `end_range` if you supply it
    at all.
    
    Change-Id: I62ffb4557124510d076bc3fefc3f5461f5843a49
    Reviewed-on: http://review.couchbase.org/42760
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
  3. Volker Mische

    Encode ranges properly

    vmx authored vmx committed
    The index merger needs to convert the query parameters from their
    Erlang representation back to the HTTP API one. Ranges use `null`
    as a wildcard which is converted to a `nil` in the Erlang world.
    This commit makes the proper conversion back.
    
    Change-Id: I471b5a95011b10082ed82d7056dcdaec37966ccc
    Reviewed-on: http://review.couchbase.org/42759
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  4. Volker Mische

    MB-12476: Spatial views don't support real reduce

    vmx authored vmx committed
    Spatial views don't support real reduce. The reduce value is used
    to store the "original MBB" which is needed by the RR*-tree algorithm.
    It is the MBB the node had on creation time.
    
    Change-Id: I42102f22af7207c883cdec5a8f10e923f318f49b
    Reviewed-on: http://review.couchbase.org/42758
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  5. Volker Mische

    MB-12546: Fix maximum node size calculation

    vmx authored vmx committed
    When inserting a node, only the size of the existing node
    was taken into account, without taking the newly added item
    into account.
    
    Change-Id: Ibc93ee1ea9bab292d74e8f63416fcf46c9564b80
    Reviewed-on: http://review.couchbase.org/42832
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Commits on Nov 5, 2014
  1. Volker Mische

    MB-12251: Throw dimensionality error early

    vmx authored vmx committed
    Throw the error when the query dimensionality doesn't match the index
    dimensionality as early as possible. This way you get a proper HTTP
    response back from a single node. Else it would first send the 200 OK
    header, and then also the 500 headers which isn't valid HTTP..
    
    Change-Id: I051361ed6b63e5d11bd0e43ff235564722faf1aa
    Reviewed-on: http://review.couchbase.org/42757
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
  2. Volker Mische

    MB-12251: Use original MBB for dimensionality comparison

    vmx authored vmx committed
    The key of the root node can be be unset. Hence use the original MBB
    for the comparison between the query and the index dimensionality.
    The original MBB is always set and has the same dimensionality the
    index has.
    
    Change-Id: I9b33219fa1640d126013704899fa8c3457810530
    Reviewed-on: http://review.couchbase.org/42756
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
Something went wrong with that request. Please try again.