This issue was in the pre-badger code (<= dc5b9e3503ecba809eff2436d1ee69a4b171f36b). I'm putting it here for anyone else who wants to continue using the old storage. Note that if you're doing this, you should also cherry-pick the other indexing bug fix, e736362eb15e75437a1404458148678902a022d4.
The behavior is that Insert() of documents after the first would result in an incorrect index since it always started with an offset of 0 regardless of how many documents were already in the collection. Attempts to access document N>0 would always get the wrong document. This usually resulted in bad JSON formatting errors, either unexpected end of JSON or invalid syntax. The patch is:
This issue was in the pre-badger code (<= dc5b9e3503ecba809eff2436d1ee69a4b171f36b). I'm putting it here for anyone else who wants to continue using the old storage. Note that if you're doing this, you should also cherry-pick the other indexing bug fix, e736362eb15e75437a1404458148678902a022d4.
The behavior is that
Insert()
of documents after the first would result in an incorrect index since it always started with an offset of 0 regardless of how many documents were already in the collection. Attempts to access document N>0 would always get the wrong document. This usually resulted in bad JSON formatting errors, either unexpected end of JSON or invalid syntax. The patch is:@ostafen, I'm submitting and then closing; hopefully others searching for a fix will find this.