Skip to content

[Bug]: function_clause when using _find on stale view when disk full #5977

@rnewson

Description

@rnewson

Version

unknown

Describe the problem you're encountering

curl http://foo:bar@localhost:5984/db1/_find -Hcontent-type:application/json -d '{"selector":{"foo":"12"}}'
{"error":"unknown_error","reason":"function_clause","ref":924235489}

[error] 2026-04-22T14:15:08.496366Z node1@127.0.0.1 <0.16849.0> f9aca98877 rexi_server: from: node1@127.0.0.1(<0.16772.0>) mfa: fabric_rpc:map_view/5 error:function_clause [{mango_cursor_view,view_cb,[ok,insufficient_storage],[{file,"src/mango_cursor_view.erl"},{line,397}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,141}]}]

Expected Behaviour

a 507 response with "insufficient storage" as reason. This does happen when calling via _view

Steps to Reproduce

  1. create a database
  2. create an index (with _index)
  3. add some documents
  4. query with _find and confirm it works
  5. enable disk_monitor on all nodes
  6. set interactive_view_indexing_threshold to 0 on all nodes
  7. add one more document
  8. query with _find

Your Environment

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions