Skip to content

Commit

Permalink
FB-2602: handle mongo v2 indexes (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalyesware authored Sep 20, 2019
1 parent 4a8089e commit f36b39d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ this to resume interrupted tailers so that no information is lost.

## Version history

### 1.1

Allow both v1 and v2 indexes when handling index creation ops.

### 1.0

Fix persistent tailers read state approach.

### 0.7

Fix outlet method nomenclature to keep compatibility with pre-existing API.

### 0.6

Fork and move to Yesware. Correct Mongo 2.0 collection method naming.
Expand Down
7 changes: 4 additions & 3 deletions lib/mongoriver/stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ def handle_create_index(spec)
spec.each do |key, value|
case key
when 'v'
unless value == 1
raise NotImplementedError.new("Only v=1 indexes are supported, " \
"not v=#{value.inspect}")
unless value == 1 || value == 2
raise NotImplementedError.new("Only v=1 or v=2 indexes are " \
"supported, not v=#{value.inspect}: " \
"spec=#{spec.inspect}")
end
when 'ns', 'key', '_id' # do nothing
else
Expand Down
2 changes: 1 addition & 1 deletion lib/mongoriver/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Mongoriver
VERSION = "1.0.0"
VERSION = "1.1.0"
end

0 comments on commit f36b39d

Please sign in to comment.