monstache: Bug: Resuming on relate uses wrong index name

Hi @rwynn , Thanks for your work, really amazing.

When Resuming using the following config, events in the change stream gets indexed to a wrong index name {“index”:{“_index”:“5c976492cf09a2266a829a76_db.students”,“_id”:“5c9e4143f37e264e131c84be”,"

version:4.16.0

resume=true
[[relate]]
	namespace="db.students"
	with-namespace="db.studentsView"
	src-field="refId"
	match-field="_id"

[[mapping]]
  namespace="db.studentsView"
  index="studentsView"
  type="studentsView"

This only happens on resumng, works fine when listening to new events in the change stream

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 49 (47 by maintainers)

Most upvoted comments

@jodevsa By the way, since you said this only triggers with resume on: in that case the change stream is started with the startAtOperationTime option set so that it can read previous entries. Maybe this bug only happens when that option is set?

https://docs.mongodb.com/manual/reference/method/db.collection.watch/

@jodevsa I created a ticket for this in the MongoDB Atlas support. Will report back if I learn anything. Please let me know if you can recreate this outside of that environment.

@jodevsa got an update today that a fix for this on the Atlas side is planned to land in the next couple weeks. They’ve been able to replicate with your script and it’s on their radar.

Thanks that’s perfect. I’ll attach it to the ticket.

Great find on this issue!

The following code reproduces the issue, it prints the ns of 2 events from 2 different change streams the first stream doesn’t have any options specified, the second one uses the ‘resumeAt’ taken from the first event