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
The problem is that we can get a big list of records and it takes time for the storage engine to prepare and send it.
Possible solution
The better approach is to iterate the records. This feature was added already in the engine as GET /b/:bucket_name/:entry_name/q method (See reductstore/reductstore#122). So, we can do something like this:
forawait(constrecordinbucket.query("entry-1",start,stop)){consol.log(record.ts,record.size);constcontent=awaitrecord.read();// or use pipeconstfileStream=fs.createWriteStream(`ts_${record.size}.txt`);record.pipe(fileStream);}
Additional context
Bucket.list method should be marked as deprecated and removed in v1.0.0 version.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Current problem
We use Bucket.list to get timestamps of records to read them:
The problem is that we can get a big list of records and it takes time for the storage engine to prepare and send it.
Possible solution
The better approach is to iterate the records. This feature was added already in the engine as
GET /b/:bucket_name/:entry_name/q
method (See reductstore/reductstore#122). So, we can do something like this:Additional context
Bucket.list
method should be marked as deprecated and removed in v1.0.0 version.Code of Conduct
The text was updated successfully, but these errors were encountered: