You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider an index_errors field in the result of write queries #4118
Currently we silently swallow errors that occur while evaluating secondary index functions. We should consider adding a index_errors field to the return object of write operations. It could have the following format:
I think it should only contain errors that occurred while evaluating the index functions for the new value of the changed document, not the ones for the old value (for example doing a delete would never have anything in this field).
It would be nice to have a way to access these errors for documents that existed before you created the index, too.
That would be more complicated though because index post construction is a background process (and there could be a lot of them). So we would need to store them somewhere and allow users to retrieve them later. I think we shouldn't do that unless someone feels really strongly about it.
This is a little out-of-left-field, but what if we added an optarg to index_create that made its response a changefeed? Then the list of errors could be the errors generated during processing and the changed would terminate when the index creation completed (or was stopped).
This would probably be easy to wrap in the WebUI. If we really wanted to go nuts it could also send back occasional percent-complete messages to make this even more friendly for reporting.
To supplement the initial proposal of including them in the response for write operations, I think @larkost's suggestion might be better realized as a new artificial table like rethinkdb.index_errors
We could even throw them in the existing rethinkdb.issues table, but given that it's persistent I think that's a little scary. "Issues" generated by secondary index construction would never be "resolved", so that table would bloat over time.
Activity
mlucy commentedon Apr 24, 2015
It would be nice to have a way to access these errors for documents that existed before you created the index, too.
danielmewes commentedon Apr 24, 2015
That would be more complicated though because index post construction is a background process (and there could be a lot of them). So we would need to store them somewhere and allow users to retrieve them later. I think we shouldn't do that unless someone feels really strongly about it.
larkost commentedon Apr 24, 2015
This is a little out-of-left-field, but what if we added an optarg to
index_createthat made its response a changefeed? Then the list of errors could be the errors generated during processing and the changed would terminate when the index creation completed (or was stopped).This would probably be easy to wrap in the WebUI. If we really wanted to go nuts it could also send back occasional percent-complete messages to make this even more friendly for reporting.
danielmewes commentedon Apr 24, 2015
@larkost That sounds pretty neat. I think it's probably too much work for this though.
marshall007 commentedon Dec 21, 2016
To supplement the initial proposal of including them in the response for write operations, I think @larkost's suggestion might be better realized as a new artificial table like
rethinkdb.index_errorsWe could even throw them in the existing
rethinkdb.issuestable, but given that it's persistent I think that's a little scary. "Issues" generated by secondary index construction would never be "resolved", so that table would bloat over time.