0
0
Commit Graph

168 Commits

Author SHA1 Message Date
Steve Yen
f6b506134b import couchbase/vellum instead of couchbaselabs/vellum
Also, scrubbed an old couchbaselabs/moss reference in comments.

Also, go fmt.
2017-12-19 10:49:57 -08:00
abhinavdangeti
8ec88a6cb0 MB-24560: Add moss store|collection histograms to stats 2017-05-25 16:32:36 -07:00
Sreekanth Sivasankaran
f759d841c2 Adding guards for config casting. 2017-03-07 22:51:27 +05:30
Sreekanth Sivasankaran
e88ff3c60a Merge branch 'store_abort_close' of https://github.com/sreekanth-cb/bleve into store_abort_close
Syntax change for errcheck tool
2017-03-07 19:56:08 +05:30
Sreekanth Sivasankaran
ee819f5950 MB-22410 - Configurable forced Store Abort API
Adding a configurable forced store close
Bumping the moss store version
2017-03-07 19:33:51 +05:30
Sreekanth Sivasankaran
67a5814fbe MB-22410:deleting/editing index definition with large dirty write queue can be very slow
Adding a configurable forced store close
2017-03-01 18:58:32 +05:30
Sreekanth Sivasankaran
324e4237cf adding configurable Abort Close 2017-03-01 16:23:56 +05:30
Sundar Sridharan
74c7de0dcf re-order childSnapshot declaration 2017-02-21 15:54:04 -08:00
Sundar Sridharan
04d428656e Add Snapshot interface methods for moss child collections feature 2017-02-20 15:03:45 -08:00
Steve Yen
931d133024 go fmt and go vet 2017-01-07 22:14:22 -08:00
Steve Yen
37490864ce bleve/index/store/moss - accessor for underlying mossStore
This change adds methods that provide access to the actual, underlying
mossStore instance in the bleve/index/store/moss KVStore adaptor.

This enables applications to utilize advanced, mossStore-specific
features (such as partial rollback of indexes).  See also
https://issues.couchbase.com/browse/MB-17805
2016-12-05 12:25:29 -08:00
Steve Yen
2a8237e8cc optimize FacetsBuilder with cached fields & avoid some allocs 2016-10-25 15:34:48 -07:00
Rob McColl
12c404aec0 Update kvstore.go 2016-10-19 10:31:00 -04:00
Rob McColl
2b26218591 Fix NumDeletes doc copy/paste err s/Merge/Delete/g 2016-10-17 12:42:21 -04:00
Steve Yen
62e6f1f648 reuse incrementBytes() in moss KV store integration
In this commit, I saw that there was a simple incrementBytes()
implementation elsewhere in bleve that seemed simpler than using the
big int package.

Edge case note: if the input bytes would overflow in incrementBytes(),
such as with an input of [0xff 0xff 0xff], it returns nil.  moss then
treats a nil endKeyExclusive iterator param as a logical
"higher-than-topmost" key, which produces the prefix iteration
behavior that we want for this edge situation.
2016-10-12 09:34:36 -07:00
Marty Schoch
2332455bd2 nicer formatting of license header 2016-10-02 10:13:14 -04:00
Marty Schoch
caf5256f74 don't export internal timers from metrics kvstore 2016-09-30 15:52:16 -04:00
Marty Schoch
fb0f4bbecd BREAKING CHANGE - new method to create memory only index
Previously bleve allowed you to create a memory-only index by
simply passing "" as the path argument to the New() method.

This was not clear when reading the code, and led to some
problematic error cases as well.

Now, to create a memory-only index one should use the
NewMemOnly() method.  Passing "" as the path argument
to the New() method will now return os.ErrInvalid.

Advanced users calling NewUsing() can create disk-based or
memory-only indexes, but the change here is that pass ""
as the path argument no longer defaults you into getting
a memory-only index.  Instead, the KV store is selected
manually, just as it is for the disk-based solutions.

Here is an example use of the NewUsing() method to create
a memory-only index:

NewUsing("", indexMapping, Config.DefaultIndexType,
         Config.DefaultMemKVStore, nil)

Config.DefaultMemKVStore is just a new default value
added to the configuration, it currently points to
gtreap.Name (which could have been used directly
instead for more control)

closes #427
2016-09-27 14:11:40 -04:00
Steve Yen
988dfb02e9 moss kvstore iterator Seek() invokes underlying moss SeekTo() API 2016-09-22 17:46:06 -07:00
slavikm
3eec1ae16c Satisfy errcheck 2016-09-21 17:56:03 +03:00
slavikm
40c1dc076f Now, without the rollback 2016-09-21 16:15:06 +03:00
slavikm
588f379962 Commit if there is no error, rollback otherwise 2016-09-21 16:13:47 +03:00
slavikm
ac49306077 Make sure that the transaction is closed if there is an error 2016-09-21 14:32:05 +03:00
Steve Yen
e8cc3c6bdd index/store/moss KV backend propagates mossStore's Stats()
This change depends on the recently introduced mossStore Stats() API
in github.com/couchbase/moss 564bdbc0 commit.  So, gvt for moss has
been updated as part of this change.

Most of the change involves propagating the mossStore instance (the
statsFunc callback) so that it's accessible to the KVStore.Stats()
method.

See also: http://review.couchbase.org/#/c/67524/
2016-09-08 17:12:04 -07:00
Steve Yen
eaa59621ff tighter moss KV store iterator handling 2016-08-19 09:10:03 -07:00
Marty Schoch
aa3ae3d39c enable read_only mode for boltdb indexes
fixes #405
2016-08-06 10:47:34 -04:00
Steve Yen
5094d2d097 optimize moss PrefixIterator
Previously, the PrefixIterator() for moss was implemented by comparing
the prefix bytes on every Next().

With this optimization, the next larger endKeyExclusive is computed at
the iterator's initialization, which allows us to avoid all those
prefix comparisons.
2016-07-21 18:33:34 -07:00
Steve Yen
cbb174b074 optimize moss iterator Next() done/k/v maintenance 2016-07-21 11:10:49 -07:00
Steve Yen
6d7fa0b964 optimize moss iterator checkDone() 2016-07-21 11:10:49 -07:00
Steve Yen
80623f4a8a MB-20101 - moss KV fix Get() of 0-length vals
The moss KV store adapter's Get() implementation was incorrectly
transforming a 0-length val (e.g., []byte{}) into a nil val.
2016-07-15 14:41:30 -07:00
Mark Mindenhall
c3c827aded Add boltdb config test 2016-06-14 13:36:40 -06:00
Mark Mindenhall
d369bd5c3c Add bucket fill percent option for boltdb 2016-06-13 18:47:38 -06:00
Marty Schoch
1be5699c54 Merge pull request #381 from MachineShop-IOT/master
Compact for boltdb (workaround for #374)
2016-06-08 00:01:20 -04:00
Steve Yen
4e531ae11b configurable mossStoreOptions and DeferredSort defaults to true 2016-06-07 17:38:43 -07:00
Mark Mindenhall
09fcc69516 rename defaultBatchSize to defaultCompactBatchSize 2016-06-01 14:25:57 -06:00
Mark Mindenhall
b5a4378a46 Cleanup godoc comments in PR 2016-06-01 13:59:57 -06:00
Mark Mindenhall
fecf7ab5c4 Compact for boltdb (workaround for #374) 2016-06-01 13:16:43 -06:00
Marty Schoch
92cf2a8974 Merge pull request #376 from MachineShop-IOT/master
Remove DictionaryTerm with count 0 during compact (workaround for #374)
2016-06-01 13:39:30 -04:00
Steve Yen
bf318b489b enable mossStore as configurable lower-level store
Also, bumped moss vendor SHA to latest moss with mossStore.
2016-05-26 13:33:22 -07:00
Mark Mindenhall
04351eb8f1 Move creation of iterator within transaction 2016-05-26 12:29:49 -06:00
Mark Mindenhall
686b20be4f Remove DictionaryTerm with count 0 during compact (workaround for #374) 2016-05-26 11:04:53 -06:00
Mark Mindenhall
3aa1d72233 Add compact method to goleveldb store 2016-05-17 16:58:17 -06:00
Marty Schoch
73b514fa4f do not put +/-Inf or NaN values into the stats map 2016-04-15 13:39:30 -04:00
Marty Schoch
639fb1ab89 remove NativeMergeOperator from core, it requires unsafe 2016-03-24 12:06:43 -04:00
Steve Yen
be2800a8e4 MB-18715 - moss Merge() didn't bump bufUsed correctly
And, also allocate more memory for both the partial and full merges.
2016-03-15 17:09:40 -07:00
Steve Yen
c1597842d0 moss lowerLevelUpdate didn't handle batches of size 1 2016-03-11 15:47:23 -08:00
Steve Yen
f1dac8b497 moss defaults to non-nil options.Log 2016-03-09 10:15:11 -08:00
Steve Yen
1d63c55f7c parse mossLowerLevelMaxBatchSize only when lower-level-store exists 2016-03-09 10:09:15 -08:00
Steve Yen
76b9365928 added moss RegistryCollectionOptions
The moss RegistryCollectionOptions allows applications to register
moss-related callback API functions and other advanced feature usage
at process initialization time.

For example, this could be used for moss's OnError(), OnEvent() and
logging callback options.
2016-03-09 09:40:29 -08:00
Marty Schoch
d7292ed891 add support for gathering stats via map for easier consumption 2016-03-07 18:37:46 -05:00