Permalink
Commits on Jan 28, 2013
  1. MB-6895 Deal with new mapreduce API

    When a map call succeeds, the returned value is no longer
    only a list of lists of KVs. An outter list element can
    also be an error tuple now, which tells us there was an
    error for a specific map function of a view.
    
    Change-Id: If4a19c0d21e21756f749747841c07ec00b798d85
    Reviewed-on: http://review.couchbase.org/24206
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Jan 25, 2013
Commits on Dec 19, 2012
  1. GC-3: Make COUCH_SRC parsing less fragile

    Newer version of rebar support a file called
    rebar.config.script to be run before the
    actual compiling is done. This way we can
    inject the value of COUCH_SRC and the MAKECHECK
    environment variable in a less fragile way.
    
    Change-Id: Ifb0082ac1b1272f590897ab6dacdcbf4a87ca6fd
    Reviewed-on: http://review.couchbase.org/23397
    Reviewed-by: Bin Cui <bin.cui@gmail.com>
    Tested-by: Bin Cui <bin.cui@gmail.com>
    vmx committed with bcui6611 Dec 18, 2012
Commits on Dec 13, 2012
  1. MB-7193: Make Spatial Views work that contain slashes

    Spatial Views that contained slashed in either the Design Document
    or the function name didn't work.
    
    Those three commits need to be merged at the same time:
    http://review.couchbase.org/23138
    http://review.couchbase.org/23175
    http://review.couchbase.org/23139
    
    Change-Id: I9142509f8fe9f2afab681f549a145856c065652d
    Reviewed-on: http://review.couchbase.org/23175
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with fdmanana Nov 15, 2012
Commits on Oct 25, 2012
  1. MB-7013: There is a branch for Apache CouchDB 1.3.x now

    Change-Id: Ie865dc966db5be59b89138685e67f48017dbe50a
    Reviewed-on: http://review.couchbase.org/21960
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Oct 25, 2012
Commits on Oct 24, 2012
  1. MB-6990: Add validation of spatial function

    The spatial function in a Design Document now has the same
    validation as the mapreduce funtions in normal views. You'll
    get errors when the spatial function isn't a valid one, or
    the name of the function has leading/trailing whitespace.
    
    This commit needs http://review.couchbase.org/21891
    else the 300-validation.t tests will fail.
    
    Change-Id: I88b7e20ba32ae66058da4d7d122190153f66eeba
    Reviewed-on: http://review.couchbase.org/21890
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Farshid Ghods <farshid@couchbase.com>
    Tested-by: Farshid Ghods <farshid@couchbase.com>
    vmx committed with Farshid Ghods Oct 23, 2012
Commits on Oct 22, 2012
  1. MB-6860: Don't leak spatial file descriptors on DB files

    When a database was compacted, there were still file descriptors
    of the spatial indexes still kept open on the old, pre-compaction
    database files.
    
    This commit is based on commits [1][2][3][4] from Apache CouchDB.
    
    [1] apache/couchdb@0ce2c54
    [2] apache/couchdb@c0de37d
    [3] apache/couchdb@152f2b9
    [4] apache/couchdb@12a593c
    
    Change-Id: I2ff9ee18a8ae5d07ddb3ffbdd7f086bfa91a1d65
    Reviewed-on: http://review.couchbase.org/21714
    Tested-by: buildbot <build@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with Farshid Ghods Oct 17, 2012
  2. MB-6860: Fix spatial index file descriptors leaks

    On the spatial indexes the file descriptors leaked, when a design
    document was updated. The issue (and fix) is similar to the
    Apache CouchDB issue COUCHDB-1309 [1].
    
    In Couchbase the design document only lives in the master database,
    hence the ddoc_updated event is only triggered for that database,
    but we need to clean up the spatial indexes for all vBuckets.
    
    The solution is to save not only a reference of the spatial view
    group but also a reference to the database that contains the
    design document. This way a cleanup on all vBuckets can be done.
    
    [1] https://issues.apache.org/jira/browse/COUCHDB-1309
    
    Change-Id: Ia9fc277f163a7adbce8a47b0a4212d6ec606858c
    Reviewed-on: http://review.couchbase.org/21592
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with Farshid Ghods Oct 12, 2012
Commits on Oct 19, 2012
  1. MB-6942: Don't return "node": "local"

    I don't have an idea why I originally returned "node": "local"
    for every row. It works also without.
    
    Change-Id: If782c19ff6fe1cf40f184f179a3aef876008cc66
    Reviewed-on: http://review.couchbase.org/21717
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with Farshid Ghods Oct 17, 2012
Commits on Oct 15, 2012
  1. MB-6860: Don't open group for cleanup

    In the old code the spatial group was opened to get the
    signature in order to cleanup the files. This meant that
    a spatial group was created although there were no spatial
    views defined in the design document.
    
    The new code doesn't create new spatial groups if there
    aren't eny defined in the design document.
    
    Change-Id: I54f6a3cdfe524c8eeacb88d4bd0d9a87d59985d4
    Reviewed-on: http://review.couchbase.org/21591
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with Peter Wansch Oct 11, 2012
Commits on Aug 13, 2012
  1. MB-6205: Make "updater_after" the default "stale" value

    From now on the default value for "stale" is "updater_after". If
    you want the old behaviour, query with "stale=false".
    
    Change-Id: Ib20099647414a879acc20e5767730ecdb2746875
    Reviewed-on: http://review.couchbase.org/19561
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with vmx Aug 13, 2012
Commits on Jul 30, 2012
  1. Changes for the "separate document body and meta" work

    GeoCouch needs slight changes to make it work with the
    new separated documents, where the documents have a
    body and a meta part.
    
    This needs to be merged along with (and all its dependencies):
    http://review.couchbase.org/17590
    
    Change-Id: I5429d0839ab56671ee481e517b6608bf14661e76
    Reviewed-on: http://review.couchbase.org/18412
    Reviewed-by: Chris Anderson <jchris@couchbase.com>
    Tested-by: Chris Anderson <jchris@couchbase.com>
    vmx committed with jchris Jul 17, 2012
Commits on Jul 20, 2012
  1. MB-100: Make GeoCouch safe for future rebar versions

    In newer rebar versions, you need to name the "src" directory
    explicitly in `src_dirs`, else those files won't get compiled.
    
    Change-Id: Iff510a22e6ade20220ceac3b59e4bf0ef2c7a87f
    Reviewed-on: http://review.couchbase.org/18641
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with vmx Jul 20, 2012
Commits on Jul 12, 2012
  1. Remove unused record

    Remove the record #node{} that wasn't used anymore.
    
    Change-Id: I432747ba22457c2c28dd078deafabbc1ca6713ea
    Reviewed-on: http://review.couchbase.org/10951
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Nov 16, 2011
  2. Make geojson_get_bbox/1 work

    The geojson_get_bbox/1 function didn't actually work. Fix it.
    
    Change-Id: I07124f763f4b473c3eb81e496cfb3d89179d12d0
    Reviewed-on: http://review.couchbase.org/10092
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Sep 29, 2011
  3. Fix spatial design docs test

    The test was too fragile. It tested for a certain file size,
    which can easily change whenever the underlying data storage
    or structure changes.
    
    Change-Id: I79b052f50032a7b5f0c06c59e21e9a2a3374b64d
    Reviewed-on: http://review.couchbase.org/14731
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Apr 10, 2012
Commits on Jul 6, 2012
  1. MB-5820: View merger expects binaries

    The view merger expects the returned rows to be binaries. Comply
    to the requirement with the Spatial Views as well.
    
    Change-Id: I6b146daf0fa1212d49dac43838c5e01d74d47bb7
    Reviewed-on: http://review.couchbase.org/17985
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Jul 6, 2012
Commits on Jun 5, 2012
  1. CBD-312 Index merger is now a separate OTP application

    Change-Id: I618c9e8a45f65f1d6ade48ba6b027355fe9c4ff3
    Reviewed-on: http://review.couchbase.org/16589
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    fdmanana committed with alk May 31, 2012
Commits on Apr 12, 2012
  1. Revert "Geometry search for GeoCouch"

    This reverts commit 5f6e9f1.
    
    Change-Id: I78d57e28b8e7c6f54c5d9d5102b324893363ff46
    Reviewed-on: http://review.couchbase.org/14785
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Apr 12, 2012
  2. Revert "Pull in dependencies for geometry search"

    This reverts commit b090085.
    
    Change-Id: Iae434720b2a80ac17260347df85803fe3a87bcaa
    Reviewed-on: http://review.couchbase.org/14786
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Apr 12, 2012
  3. Revert "Make geometry search work with spatial merging"

    This reverts commit dc9864e.
    
    Change-Id: Ibdce766381b96f66194bcdf7bc5f4d9bedb87254
    Reviewed-on: http://review.couchbase.org/14784
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Apr 12, 2012
Commits on Apr 11, 2012
  1. Make geometry search work with spatial merging

    Geometry search wasn't working with spatial merging. This
    fixes it and it also adds a test, to prevent future regression.
    
    Change-Id: Ib0de1f5acb03ef4252f4dcff01a6d87e67f835dd
    Reviewed-on: http://review.couchbase.org/13827
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with fdmanana Mar 8, 2012
  2. Geometry search for GeoCouch

    Spatial indexes can now be searched with a geometry,
    e.g. a polygon. The query parameter is "geometry"
    the value needs to be URL encoded Well-Known Text.
    Supported geometry types are (Multi)Point, (Multi)LineString,
    (Multi)Polygon.
    
    Example:
    curl -X GET 'http://localhost:5984/places/_design/main/_spatial/points?geometry=POLYGON((-21.0+58.9,+21.0+-61.1,+113.9+-54.3,+150.4+72.289067198883,+-21.0+58.9))'
    
    Change-Id: I7b3b6fc8e6f8e2109e61a77834cfad1ec0ae28df
    Reviewed-on: http://review.couchbase.org/10095
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with fdmanana Oct 12, 2011
  3. Pull in dependencies for geometry search

    Geometry search needs a WKT parser as well
    as Erlgeom to calculate the intersections.
    
    To checkout the dependencies use ./rebar get-deps
    
    Change-Id: I6b7109f5ffe70723a175816de997a96fa7ed8e0a
    Reviewed-on: http://review.couchbase.org/13786
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with fdmanana Mar 5, 2012
  4. Prepare for polygon search

    Internal functions can be re-used for the polygon search if
    the geometry types are converted to atoms, which is the way
    they are stored in the Erlang term representation.
    
    Change-Id: I0b946648976938bc875ac1970731afe9c48c7c66
    Reviewed-on: http://review.couchbase.org/10093
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with fdmanana Sep 29, 2011
  5. Use rebar for building GeoCouch

    Instead of using Emake, use rebar to build GeoCouch.
    This will make it easier for future dependencies.
    The output directory for the beam files changed from "build"
    to "ebin".
    
    Change-Id: Idbe9e2ef4197e5886f7ed6627d3689c9f530714f
    Reviewed-on: http://review.couchbase.org/9825
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    vmx committed with fdmanana Sep 28, 2011
Commits on Apr 6, 2012
  1. Index merging now uses lhttpc instead of ibrowse

    These changes are required after replacing ibrowse with
    lhttpc in CouchDB's index merger.
    
    Change-Id: Ibae8a49f7f4a26ff3993909d746479007c3d9cd5
    Reviewed-on: http://review.couchbase.org/14590
    Tested-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    fdmanana committed with Damien Katz Apr 5, 2012
  2. Fix test spatial_compaction

    This got broken after the CouchDB changes for a termless
    file format.
    
    Change-Id: If182a64c2ca3b69937f90863bb7fb4e350686ab7
    Reviewed-on: http://review.couchbase.org/14588
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    fdmanana committed with Damien Katz Apr 5, 2012
Commits on Mar 27, 2012
  1. Use the new MapReduce component added to CouchDB

    Computing the spatial results for a document is now done
    by the new MapReduce component (an Erlang NIF) added to
    CouchDB, that is, it no longer uses CouchJS.
    CouchJS was removed from CouchDB.
    
    Change-Id: I13b9f3fe675aa7680cc43fdbce1afa377e179ebb
    Reviewed-on: http://review.couchbase.org/14152
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    fdmanana committed with Damien Katz Mar 21, 2012
Commits on Feb 27, 2012
  1. Do actually run the insert_outliers/5 tests

    The tests for insert_outliers/5 weren't run, caused by
    a typo.
    
    Change-Id: Ib11cbf49c70faad93aae8e21a6be31f63a561659
    Reviewed-on: http://review.couchbase.org/13514
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    vmx committed with alk Feb 23, 2012
  2. Make GeoCouch Etap tests work with Erlang R15

    Erlang R15 changed the output of random:seed/1. Hence some
    tests were failing. This commit makes the Etap tests compatible
    with R15.
    
    Change-Id: I0c3819b4ca8e58354d38e18ab766ccb10ca2ecf9
    Reviewed-on: http://review.couchbase.org/13513
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    vmx committed with alk Feb 23, 2012
Commits on Feb 14, 2012
  1. Making doc_info and doc body info simpler, for use by couchstore.

    Makes api and types simpler. Corrsponding changes made here.
    
    Change-Id: I107c3fc3f4a707f247ec376faea14d5c756a6877
    Reviewed-on: http://review.couchbase.org/13098
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Damien Katz committed Feb 8, 2012
Commits on Feb 8, 2012
  1. Spatial merger returned incorrect geometry

    The spatial merger returned the geometry type as key and the
    coordinates as value instead of returning
    "type": <geometrytype>, "coordinates": <coordinates>.
    
    Test to prevent future regression was added as well.
    
    Change-Id: Iecabef599d32d1ba0f0de69b1b77be0ca25d2b76
    Reviewed-on: http://review.couchbase.org/13055
    Reviewed-by: Jan Lehnardt <jan@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Feb 7, 2012
Commits on Jan 25, 2012
  1. Changes on B-trees need to be flushed manually

    Change-Id: I548a06df70f72082d5cf7ad637c9144262b8e58f
    Reviewed-on: http://review.couchbase.org/12352
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Jan 13, 2012
  2. Fix bad match with database

    Old code was mixes with new code. Don't get the database
    from the record, but open it.
    
    Change-Id: I0b376ad71d201754fa3d100c7851a32a2f5f8ffd
    Reviewed-on: http://review.couchbase.org/12351
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Jan 13, 2012
  3. Headers weren't flushed

    In Couchbase you need to flush manually. The couch_file:flush/1
    where missing after writing the header.
    
    Change-Id: I111c4d797ab8155187ff095a1e8a32016ca87039
    Reviewed-on: http://review.couchbase.org/12350
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    vmx committed with vmx Jan 13, 2012