Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailable cursor with awaitData should block and not error #3957

Open
b1ron opened this issue Jan 9, 2024 · 1 comment · May be fixed by #3961
Open

Tailable cursor with awaitData should block and not error #3957

b1ron opened this issue Jan 9, 2024 · 1 comment · May be fixed by #3961
Assignees
Labels
area/cursors Issues about cursors code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI

Comments

@b1ron
Copy link
Contributor

b1ron commented Jan 9, 2024

FerretDB version

v1.18.0-2-g2c2db29b

Backend

only checked with PostgreSQL

Environment

dev

What did you do?

See #3956.

What did you expect to see?

After the timeout expired an empty batch and an open cursor.

        "cursor" : {
                "nextBatch" : [ ],
                "id" : NumberLong("7129611981940357923"),
                "ns" : "test.foo"
        }

What did you see instead?

uncaught exception: Error: command failed: {
        "ok" : 0,
        "errmsg" : "[msg_getmore.go:253 handler.(*Handler).MsgGetMore] [msg_getmore.go:332 handler.(*Handler).awaitData.func1] [cursor.go:121 cursor.(*Cursor).Reset] [projection_iterator.go:60 common.(*projectionIterator).Next] [filter_iterator.go:52 common.(*filterIterator).Next] [query_iterator.go:95 postgresql.(*queryIterator).Next] iterator is read to the end or closed",
        "code" : 1,
        "codeName" : "InternalError"
} with original command request: {
        "getMore" : NumberLong(62),
        "collection" : "foo",
        "batchSize" : 1,
        "maxTimeMS" : 60000,
        "lsid" : {
                "id" : UUID("3574cdf1-b409-40e7-b61c-596cb64eb407")
        }
@b1ron b1ron added code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI labels Jan 9, 2024
@b1ron b1ron changed the title Tailable cursor with awaitData should timeout and not error Tailable cursor with awaitData should block and not error Jan 9, 2024
@AlekSi AlekSi added the area/cursors Issues about cursors label Jan 9, 2024
@AlekSi
Copy link
Member

AlekSi commented Jan 9, 2024

Probably the same as #2984 and/or #2983

@AlekSi AlekSi assigned noisersup and unassigned ferretdb-bot Jan 9, 2024
@AlekSi AlekSi linked a pull request Jan 16, 2024 that will close this issue
9 tasks
@AlekSi AlekSi self-assigned this Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cursors Issues about cursors code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants