Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Nov 6, 2014
  1. @vmx

    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. @vmx

    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. @vmx

    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>
  3. @vmx

    MB-12476: Set reduce correctly

    vmx authored vmx committed
    The reduce in the spatial views is the original MBB (needed by the
    RR*-tree allgorithm).
    
    Change-Id: Ia566633a1b814e5e2df676f6c4ff8455ed10caac
    Reviewed-on: http://review.couchbase.org/42755
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  4. @vmx

    MB-12476: Set original MBB correctly

    vmx authored vmx committed
    The RR*-tree algorithm uses a so-called "original MBB". It is the
    bounding box of the node when it was first created.
    
    Change-Id: I24c5f57a0dacb352c3f2777b0c1a23e0ac15ac90
    Reviewed-on: http://review.couchbase.org/42754
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  5. @vmx

    MB-12251: Better error messages during emit

    vmx authored vmx committed
    The errors on emit now are more specific. Their error atom is `key_emit`
    instead of just `error`.
    
    Change-Id: Id45f1a0a837ae2ddda12a7f9fd0cedf6a7359a91
    Reviewed-on: http://review.couchbase.org/42753
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Commits on Nov 4, 2014
  1. @vmx

    Encode/decode original MBB correctly

    vmx authored vmx committed
    The original MBB wasn't encoded/decoded correctly.
    
    Change-Id: Ifeef36509ab8388c6d13c0737ec116633213d92d
    Reviewed-on: http://review.couchbase.org/42305
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
  2. @vmx

    MB-12251: Improve query parsing errors

    vmx authored vmx committed
    Add more end-user friendly error messages when the query parameter
    are invalid. This commit also adds tests.
    
    Change-Id: I1a6902aa62750e7e5109d1a6956bc15f486904e1
    Reviewed-on: http://review.couchbase.org/42304
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  3. @vmx

    MB-12251: Throw error when range has wrong dimensionality

    vmx authored vmx committed
    In case you query with a range that doesn't have the same dimensionality
    as the index it throws a proper error now:
    
        The query range must have the same dimensionality as the index.
    
    Change-Id: I6606753fc14e0d86cce5522f18cdf1fcbad126fa
    Reviewed-on: http://review.couchbase.org/42303
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
  4. @vmx

    MB-12251: Better error messages for emits

    vmx authored vmx committed
    When there were non-valid emits the error messages weren't meaningful.
    This commits adds nicer error messages and tests accordingly.
    
    Change-Id: I9950866667f9a9990cb29aed3f260e4f4564fdbe
    Reviewed-on: http://review.couchbase.org/41773
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
  5. @vmx

    MB-12251: Add tests for emit

    vmx authored vmx committed
    The emit can emit either a single geometry, multiple dimensions or
    a geometry and multiple dimensions. This commits adds tests for all
    cases.
    
    Change-Id: Ifa9055e68691d4660bb956f268f7b1061e6920d2
    Reviewed-on: http://review.couchbase.org/41772
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
Commits on Oct 30, 2014
  1. @vmx

    String instead of binary was returned

    vmx authored vmx committed
    GeometryCollection returned the property `geometries` as a string
    and not as a binary.
    
    Change-Id: I3d17afd97e92b1ec2b50ccc8cbde94a66a417d37
    Reviewed-on: http://review.couchbase.org/41771
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
  2. @vmx

    MB-12251: Add tests with open ranges

    vmx authored vmx committed
    The multi-dimensional index supports open ranges, either on start,
    end or both sides. Add additional tests for such cases.
    
    Change-Id: I440318d2d414cea36f5706e5f13cad150e8df8a0
    Reviewed-on: http://review.couchbase.org/41770
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  3. @vmx

    Always use minor version 1 for binaries

    vmx authored vmx committed
    When converting Erlang terms to binary, always use minor version 1.
    Also use minor version 1 when determining the size of a term.
    
    Change-Id: I3de9e3960509a7e0939375e5140a35f0176674a9
    Reviewed-on: http://review.couchbase.org/42226
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Commits on Oct 20, 2014
  1. @vmx

    Only set CMAKE_MODULE_PATH if not set

    vmx authored vmx committed
    The tlm sets the CMAKE_MODULE_PATH. If a geocouch build is run without
    the tlm (e.g. for the special build for the unit tests) then the module
    path is set.
    
    Change-Id: I439eaef8ad3a6ffed447b1dbf83fa2a8263f3756
    Reviewed-on: http://review.couchbase.org/42290
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Oct 16, 2014
  1. @vmx

    Build geocouch in a special way for the unit tests

    vmx authored vmx committed
    The unit tests also test non-exported functions, hence the source needs
    to be compiled with the `+export_all` flag. As we don't want to have
    everything exported in the normal build, a special build is needed.
    
    With this change it's possible to compile geocouch again with
    `GEOCOUCH_BUILD_FOR_UNIT_TESTS=1` set. In order to have everything
    work, you need to perform the usual compilation steps frist, which
    will create a `build` directory. You then create a subdirectory
    (e.g. `geocouch-for-tests`) which will contain the special build.
    
    From within that directory simply run:
    
        cmake -G "Unix Makefiles" -D BUILD_FOR_UNIT_TESTS=1  ../../geocouch
    
    To run the unit tests, simply run a `make`, followed by a `make test`.
    
    Change-Id: I0d932bd80dd31f355e48cfa15d55fc8bfa3f6b95
    Reviewed-on: http://review.couchbase.org/41991
    Reviewed-by: Chris Hillery <ceej@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  2. @vmx

    Add dialyzing to geocouch

    vmx authored vmx committed
    With `make geocouch-dialyzer` within the build directory it's possible
    to run dialyzer on the geocouch code. The `make geocouch-chech` target
    will also run the dialyzer first before running the tests.
    
    This commit also fixes some problems found during dialyzing.
    
    Change-Id: I4cb4bd0f9184f0cbc98b1a74a8fdd76a6be6bee9
    Reviewed-on: http://review.couchbase.org/41990
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  3. @vmx

    Delete vtree_copy module

    vmx authored vmx committed
    The vtree_copy module is no longer used, the initial index build is
    now done in couchstore.
    
    Change-Id: I4d79df6680b94ea07d259a58da4ae805f3267708
    Reviewed-on: http://review.couchbase.org/41950
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  4. @vmx

    MB-12249: Use couchdb test run script

    vmx authored vmx committed
    Run the etap tests with the couchdb test run script, this should make
    them work on Windows as well.
    
    This commit also does a bit of refactoring to be more along the lines
    of the couchdb CMake build.
    
    Change-Id: I339ff146a4920db0d59a8eafb02cf910e2dc02a1
    Reviewed-on: http://review.couchbase.org/41769
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  5. @vmx

    MB-12249: Fix gc-couchbase tests

    vmx authored vmx committed
    The tests now need the fake DCP server to start up.
    
    Also the results can contain a geometry, currently it is set to
    `nil` as the tests don't supply one.
    
    Change-Id: I9d391feaebf965f05f706b6aa7c8e924da4fb666
    Reviewed-on: http://review.couchbase.org/41768
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Oct 6, 2014
  1. @vmx

    MB-12249: Make vtree unit tests pass again

    vmx authored vmx committed
    The on-disk file format was changed. The body as well as the geometry
    are stored as part of the value and not separately. Hence the
    `vtree_io:write_kvnode_external/2` and `vtree_io:read_kvnode_external/2`
    functions don't exist anymore.
    
    Due to this change the size of a single kv_node increased, hence the
    kv_chunk_threshold needed to be increased for some unit tests.
    
    Change-Id: Id031e2601f0b40cb16caada5bd029c4f047fd976
    Reviewed-on: http://review.couchbase.org/41767
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  2. @vmx

    Error on warnings for gc-couchbase

    vmx authored vmx committed
    Change-Id: I10498c8d6c83715eb0f10332cbe129b7617b19a4
    Reviewed-on: http://review.couchbase.org/41766
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  3. @vmx

    Silence compile time deprecated type warning

    vmx authored vmx committed
    In Erlang >= 17.0 the type of dicts should be dict:dict/0
    or dict:dict/2. But that's not compatible with Erlang R16.
    Hence set a compile flag to silence it.
    
    The warning with Erlang 17.0 is:
    
        gc-couchbase/src/spatial_view.erl:166: Warning: type dict/0 is
        deprecated and will be removed in OTP 18.0; use use dict:dict/0
        or preferably dict:dict/2
    
    Change-Id: Ibee2cf50172e5aebd1636744ee491bc044724e8d
    Reviewed-on: http://review.couchbase.org/41765
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  4. @vmx

    Fix unused variable warnings

    vmx authored vmx committed
    Change-Id: I57b572f855f8aa4e2df9853cfb56a68843f8e301
    Reviewed-on: http://review.couchbase.org/41764
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  5. @vmx

    Compile things correctly after rebar upgrade

    vmx authored vmx committed
    For the new rebar version the recursive flag for cleaning up all
    sub projects.
    
    As we don't use the rebar.config.script anymore the compiler
    macro `makecheck` is passed in directly to rebar from the Makefile
    
    Change-Id: Ic8158c423e74c8c3e6255462dafb006ac58cc174
    Reviewed-on: http://review.couchbase.org/41763
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Sep 11, 2014
  1. @vmx

    Geometries can be part of a multidimensional key

    vmx authored vmx committed
    A geometry can now be part of the multidimensional emit, for example:
    
        emit([{"type": "Point", "coordinates": [0,1]}, 11], null);
    
    The geometry must be the first element of the key.
    
    Change-Id: I4ff74782ce3114885fc238369e0835b0a1e15ca3
    Reviewed-on: http://review.couchbase.org/41367
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  2. @vmx

    Fix bounding box calculation

    vmx authored vmx committed
    The bounding box calculation expected tuples instead of lists. This
    broke the boudning box calculation of linestrings and polygons.
    
    Change-Id: Id2cab6521226022eae77c10340f3bcc09647a453
    Reviewed-on: http://review.couchbase.org/41366
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Sep 4, 2014
  1. @vmx

    MB-12093: Don't double encode value in spatial views

    vmx authored vmx committed
    The return value of the emit in spatial views was accidentally
    double encoded.
    
        The emit -> current value -> expected value:
    
        emit(key, 5) -> {"value: "5"} -> {"value": 5}
        emit(key, "string"} -> {"value": "\"string\""} -> {"value": "string"}
        emit(key, null) -> {"value": "null"} -> {"value": null}
    
    Change-Id: Iddf69fe594bf0d8cad31e8856b666dcc7b20f076
    Reviewed-on: http://review.couchbase.org/41027
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Aug 27, 2014
  1. @vmx

    MB-12048: Signature generation is indexer specific

    vmx authored vmx committed
    The generation of the view group signature is no longer independent
    of the type of the indexer. Now the mapreduce and the spatial index
    have their own calculation.
    
    Change-Id: I901f6044cde5848eaaf18f63234e339cf3c80c82
    Reviewed-on: http://review.couchbase.org/40916
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Sriram Melkote <siri@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Aug 20, 2014
  1. @vmx @melkote

    MB-12007: Add proper license

    vmx authored melkote committed
    GeoCouch is licensed under the Apache License 2.0.
    
    Change-Id: I1986cc622f2ab2c030b3a2873e542a85018c4a9d
    Reviewed-on: http://review.couchbase.org/40727
    Reviewed-by: Sriram Melkote <siri@couchbase.com>
    Tested-by: Sriram Melkote <siri@couchbase.com>
Commits on Aug 11, 2014
  1. @vmx

    Make source Erlang R14 compatible

    vmx authored vmx committed
    In Erlang R14 erlang:integer_to_binary/1 didn't exist, replace it
    with list_to_binary(integer_to_list/1).
    
    Change-Id: I2377aa992d43f8f9e46776049d9aa764470fdced
    Reviewed-on: http://review.couchbase.org/40506
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  2. @vmx

    Move the _spatial design handler to ns_server

    vmx authored
    ns_server takes care of the _spatial design handler, hence it should
    also be configured in the capi.ini of ns_server.
    
    Change-Id: I672d9e24f84f4c3ec6891e3e1789d740415fd63d
    Reviewed-on: http://review.couchbase.org/40416
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  3. @vmx

    Upgrade rebar

    vmx authored
    In order to make the build work on Windows a more recent rebar is needed.
    Rebar is upgraded to:
    
        rebar 2.5.1 R14B04 20140730_173812 git 2.5.1-1-ge9f62c4
    
    Change-Id: I8416aa5fea727ef7f7148fd06090794ec99d19ff
    Reviewed-on: http://review.couchbase.org/40493
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    
    Conflicts:
    	rebar
  4. @vmx

    Add support for non-range emits

    vmx authored
    It's now possible to emit a point rather than a range per dimesnion.
    So if you emit a 2-dimensional point, you no longer need to emit:
    
        emit([[doc.lon, doc.lon], [doc.lat, doc.lat]], null);
    
    But you can simply do a:
    
        emit([doc.lon, doc.lat], null);
    
    Change-Id: Ica542533e378222e76503edabf72fe57e589942c
    Reviewed-on: http://review.couchbase.org/40371
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  5. @vmx

    Add support for geometries

    vmx authored
    The spatial views now also store the supplied geometry and return it
    on query time. When a view is created without a geometry, it won't
    be included in the result.
    
    Change-Id: Idb7418bb5aff124d0ecf9dfb03445c28a2b36381
    Reviewed-on: http://review.couchbase.org/40370
    Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Something went wrong with that request. Please try again.