0
0
Fork 0
Commit Graph

1713 Commits

Author SHA1 Message Date
Marty Schoch f58a205ae8 remove 1.6 from travis, add "1.10" 2018-02-27 11:29:16 -08:00
Steve Yen 1a319cdf5b
Merge pull request #784 from steveyen/drops-loop-optimization
scorch zap merge optimize drops lookup to outside of loop
2018-02-27 09:52:56 -08:00
Steve Yen 3f1dcb6078 scorch zap merge optimize drops lookup to outside of loop 2018-02-27 09:23:29 -08:00
Marty Schoch b8bb7922eb
Merge pull request #782 from steveyen/scorch-intcoder-optimizations
Various scorch optimizations around merge & chunkedIntCoder
2018-02-26 17:57:00 -05:00
Steve Yen 99ed127176 scorch zap merge optimize newDocNums lookup to outside of loop
And, also a "go fmt".
2018-02-26 14:23:55 -08:00
Steve Yen 98d5d7bd81 scorch zap chunkedIntCoder optimizations
The optimizations / changes include...

- reuse of a memory buf when serializing varint's.

- reuse of a govarint.U64Base128Encoder instance, as it's a thin,
  wrapper around an underlying chunkBuf, so Reset()'s on the
  chunkBuf is enough for encoder reuse.

- chunkedIntcoder.Write() method was changed to invoke w.Write() less
  often by forming a larger, reused buf.  Profiling and analysis
  showed w.Write() was getting called a lot, often with tiny 1 or 2
  byte inputs.  The theory is w.Write() and its underlying memmove()
  can be more efficient when provided with larger bufs.

- some repeated code removal, by reusing the Close() method.
2018-02-26 14:17:09 -08:00
Steve Yen ce2332e111 scorch zap merge reuses tf/locEncoder across terms
The finishTerm() helper func that's invoked on every outer loop resets
the tf/locEncoders so they can be safely reused.
2018-02-26 11:37:11 -08:00
Marty Schoch eca31dfd27
Merge pull request #777 from sreekanth-cb/persister_pause
pausing persister until merging catches up
2018-02-26 14:36:07 -05:00
Steve Yen 002df80357
Merge pull request #780 from sreekanth-cb/mergeplanner_options
configurable mergePlanner options
2018-02-26 11:33:31 -08:00
Sreekanth Sivasankaran e02849fcda
fix the indentation 2018-02-26 16:21:33 +05:30
Sreekanth Sivasankaran c45822347f
Merge branch 'master' into mergeplanner_options 2018-02-26 15:59:20 +05:30
Sreekanth Sivasankaran e4cc79a9ad adopting json parsing on options,
fixed the inadvertant option modification
2018-02-26 15:56:30 +05:30
Sreekanth Sivasankaran f0a65f041d cleaning up the wait loop 2018-02-25 20:58:53 +05:30
Sreekanth Sivasankaran 3a571ad283
Merge branch 'master' into persister_pause 2018-02-24 23:57:20 +05:30
Sreekanth Sivasankaran 874829759b
cleaning up the wait loop 2018-02-24 23:53:49 +05:30
Sreekanth Sivasankaran 4109e327ff
Merge pull request #771 from sreekanth-cb/merge_handling_empty_seg_tasks
Fix for empty segment merge handling
2018-02-24 10:48:31 +05:30
Sreekanth Sivasankaran 683e195ac4 adding empty segment handling during introduction
cleaning up the segment live size check
2018-02-24 07:03:27 +05:30
Abhinav Dangeti 1929ceb1f5
Merge pull request #781 from abhinavdangeti/upsidedown-missing-close
Handle case where store snapshot isn't closed in upsidedown's Batch() API
2018-02-23 15:02:44 -08:00
abhinavdangeti da70758635 Handle case where store snapshot isn't closed in upsidedown's Batch() API 2018-02-23 14:47:22 -08:00
Steve Yen 19080c1ae5
Merge pull request #779 from steveyen/wip-in-mem-seg-merging
merging of in-memory segments during persistSnapshot
2018-02-23 14:02:02 -08:00
Steve Yen c50d9b4023 scorch conditional merging during persistSnapshot()
As part of this change, there are nw helper methods --
persistSnapshotMaybeMerge() and persistSnapshotDirect().
2018-02-23 09:17:02 -08:00
Sreekanth Sivasankaran a1db057656 configurable mergePlanner options
mergePlanner options are parsed from the
scorch configs parameters
2018-02-23 16:09:37 +05:30
Sreekanth Sivasankaran a8ebf2a553 lowering epochDistance to 5,
fixing the lastMergedEpoch value updates
2018-02-21 17:25:14 +05:30
Steve Yen a0b7508da7 scorch zap mergeSegmentBases() func
As part of this, zap.MergeToWriter() now returns more information --
enough so that callers can now create their own SegmentBase instances.

Also, the fieldsMap maintained and returned by zap.MergeToWriter() is
now a mapping from fieldName ==> fieldID+1 (instead of the previous
mapping from fieldName ==> fieldID).  This makes it similar to how
fieldsMap are handled in other parts of zap to avoid "zero value"
issues.
2018-02-19 14:13:31 -08:00
Steve Yen 720010783e scorch zap InitSegmentBase() helper func
Refactored out a zap.InitSegmentBase() func so that non-zap packages
can create SegmentBase instances.
2018-02-19 14:13:31 -08:00
Steve Yen 656220ca9d
Merge pull request #769 from steveyen/scorch-rollback-ignores-unsafeBatch
scorch rollback ignores unsafeBatch flag
2018-02-15 18:51:59 -08:00
Sreekanth Sivasankaran 606a270669 Fix for empty segment merge handling
Avoid creating new files with emtpy segments tasks
during the merge operation, skips the
incorrect appending of a newer segment during merge.
2018-02-15 16:44:20 +05:30
Sreekanth Sivasankaran 35611f4287
Merge branch 'master' into persister_pause 2018-02-14 16:53:06 +05:30
Sreekanth Sivasankaran 6f2797bec3 Adding a pause to persister until the merger
catches up
2018-02-14 16:39:26 +05:30
Steve Yen 030469a351
Merge pull request #767 from steveyen/persistSnapshot-err-handling
improvements to err handling in persistSnapshot(), etc
2018-02-13 14:53:42 -08:00
Steve Yen 2651ba4b19
Merge pull request #773 from steveyen/merge-enumerator
scorch zap segment merging via a new enumerator instead of vellum.MergeIterator
2018-02-13 13:05:39 -08:00
Steve Yen 57fc03258e scorch rollback ignores unsafeBatch flag
See also: https://github.com/blevesearch/bleve/issues/760
2018-02-13 10:21:42 -08:00
Steve Yen 29663c2795
Merge pull request #770 from steveyen/optimize-prealloced-postings-iterator
scorch zap segment merging reuses prealloc'ed PostingsIterator
2018-02-13 10:02:42 -08:00
Steve Yen fe544f3352 scorch zap merge uses enumerator for vellum.Iterator's 2018-02-12 21:28:46 -08:00
Steve Yen a073424e5a scorch zap dict.postingsListFromOffset() method
A helper method that can create a PostingsList if the caller already
knows the postingsOffset.
2018-02-12 20:54:07 -08:00
Steve Yen 2158e06c40 scorch zap merge collects dicts & itrs in lock-step
The theory with this change is that the dicts and itrs should be
positionally in "lock-step" with paired entries.

And, since later code also uses the same array indexing to access the
drops and newDocNums, those also need to be positionally in pair-wise
lock-step, too.
2018-02-12 20:54:07 -08:00
Steve Yen 95a4f37e5c scorch zap enumerator impl that joins multiple vellum iterators
Unlike vellum's MergeIterator, the enumerator introduced in this
commit doesn't merge when there are matching keys across iterators.

Instead, the enumerator implementation provides a traversal of all the
tuples of (key, iteratorIndex, val) from the underlying vellum
iterators, ordered by key ASC, iteratorIndex ASC.
2018-02-12 20:54:06 -08:00
Steve Yen a4c54c4389
Merge pull request #772 from abhinavdangeti/master
Update vendor'ed revision for moss to the latest
2018-02-12 11:12:44 -08:00
abhinavdangeti 846235593c Update vendor'ed revision for moss to the latest 2018-02-12 10:04:34 -08:00
Steve Yen e37c563c56 scorch zap merge move fieldDvLocsOffset var declaration
Move the var declaration to nearer where its used.
2018-02-08 18:03:09 -08:00
Steve Yen f177f07613 scorch zap segment merging reuses prealloc'ed PostingsIterator
During zap segment merging, a new zap PostingsIterator was allocated
for every field X segment X term.

This change optimizes by reusing a single PostingsIterator instance
per persistMergedRest() invocation.

And, also unused fields are removed from the PostingsIterator.
2018-02-08 17:24:30 -08:00
Steve Yen 6f5f90cd41 scorch zap segment cleanup handling for some edge cases
Two cases in this commit...

If we're shutting down, the merger might not have handed off its
latest merged segment to the introducer yet, so the merger still owns
the segment and needs to Close() that segment itself.

In persistSnapshot(), there migth be cases where the persister might
not be able to swap in its newly persisted segments -- so, the
persistSnapshot() needs to Close() those segments itself.
2018-02-08 14:04:04 -08:00
Steve Yen 83272a9629 scorch persistSnapshot() err handling & propagation 2018-02-08 14:03:59 -08:00
Steve Yen dee6a2b1c6 scorch persistSnapshot() consistently uses err to commit vs abort
Some codepaths in persistSnapshot() were saving errors into an err2
local variable, which might lead incorrectly to commit during an error
situation rather than abort.
2018-02-08 14:02:35 -08:00
Steve Yen 7b9fe0a216
Merge pull request #768 from steveyen/issue-764
scorch uses segment.id to encode boltdb sub-bucket key
2018-02-08 13:51:11 -08:00
Steve Yen 91ac0d011a scorch uses segment.id to encode boltdb sub-bucket key
fixes #764
2018-02-08 13:25:16 -08:00
Steve Yen 8a7990427f
Merge pull request #765 from steveyen/more-TestIndexRollback-fixes
fix for TestIndexRollback unit tests
2018-02-08 12:45:28 -08:00
Steve Yen 1552caeab9
Merge pull request #766 from steveyen/scorch-persistSnapshot-comment
scorch persistSnapshot comments update
2018-02-08 12:41:01 -08:00
Steve Yen d0644fec12 scorch persistSnapshot comments update
See also: https://github.com/blevesearch/bleve/issues/763
2018-02-08 12:22:58 -08:00
Steve Yen 99852accb0 scorch RollbackPoints() no error at start & fix TestIndexRollback
When a scorch is just opened and is "empty", RollbackPoints() no
longer considers that an error situation.

Also, this commit makes the TestIndexRollback unit tests is a bit more
forgiving to races, as we were seeing failures sometimes in travis-CI
environments (TestIndexRollback was passing fine on my dev macbook).
The theory is the double-looping in the persisterLoop would sometimes
be racy, leading to 1 or 2 rollback points.
2018-02-08 11:45:25 -08:00