INNER CODE UNIT · Go

positionLost

rwynn/gtm · gtm.go:555

func positionLost(err error) bool {
	var serverErr mongo.ServerError
	if errors.As(err, &serverErr) {
		// 136  : cursor capped position lost
		// 286  : change stream history lost
		// 280  : change stream fatal error
		// 10334 : bson object too large
		for _, code := range []int{136, 286, 280, 10334} {
			if serverErr.HasErrorCode(code) {
				return true
			}
		}
	}
	return false
}

func invalidCursor(err error) bool {
	var serverErr mongo.ServerError

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…