-
-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Description
It seems that the more documents you have, the higher chance of a disconnect. Then the lack of any retry policy causes your application to die.
Example query that causes this:
func DomainDocument(ctx *rethinkdb.Context) r.Term {
return r.Db(ctx.Config.Database).Table("domains")
}
func FindDomainByDomain(ctx *rethinkdb.Context, domain string) (*Domain, error) {
var err error
var cursor *r.Cursor
if cursor, err = DomainDocument(ctx).Filter(r.Row.Field("Domain").Eq(domain)).Run(ctx.Session); err != nil {
return nil, err
}
defer cursor.Close()
if cursor.IsNil() {
return nil, nil
}
var d Domain
if err = cursor.One(&d); err != nil {
return nil, err
}
return &d, nil
}
Metadata
Metadata
Assignees
Labels
No labels