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
createHistoryStream currently hangs when blocks are not available. I would like to iterate over the full history of a hyperbee which is not fully replicated. Could createHistoryStream() accept a { wait: false } argument to make it keeping loop when it encounters BLOCK_NOT_AVAILABLE? Perhaps this API could be used like this:
for await (const entry of db.createHistoryStream({ wait: false })) {
if (entry.type = 'put') handlePut()
if (entry.type = 'del') handleDel()
if (entry.type = 'BLOCK_NOT_AVAILABLE') handleMissingBlock()
}
The text was updated successfully, but these errors were encountered:
josephmturner
changed the title
Improve createHistoryStream() behavior when blocks are not available
Don't hang in createHistoryStream() when blocks are not available
Oct 31, 2024
createHistoryStream
currently hangs when blocks are not available. I would like to iterate over the full history of a hyperbee which is not fully replicated. CouldcreateHistoryStream()
accept a{ wait: false }
argument to make it keeping loop when it encountersBLOCK_NOT_AVAILABLE
? Perhaps this API could be used like this:The text was updated successfully, but these errors were encountered: