kndndrj / nvim-dbee

Interactive database client for neovim
GNU General Public License v3.0
606 stars 39 forks source link

Can't save (big) result to csv file (cr.Rows cache flushing timeout exceeded: context deadline exceeded) #123

Open mr-majkel opened 3 weeks ago

mr-majkel commented 3 weeks ago

Hi,

I have a rather big result to download from an oracle database into a csv file, and the results fail to save. Downloading with dbeaver on the same query returns a csv of 174 MB (916 771 lines). The file is created by dbee, but it stays at 0 bytes untill erroring out.

What is interesting is that I can traverse through the results' pages no problem (however, the "last page" is actually not the last one, and the data seems to keep caching in the results window, with each page switch)

Here is the log:

2024/06/10 17:24:11 [info]: calling method "DbeeCallStoreResult"
2024/06/10 17:29:11 [info]: method "DbeeCallStoreResult" failed with error: res.Format: cr.Rows: cache flushing timeout exceeded: context deadline exceeded

And here is the error from nvim (the paths are redacted):

Error  17:29:11 msg_show.rpc_error Enter file name: rawdata.csv E5108: Error executing lua: function DbeeCallStoreResult[1]..remote#define#request, line 2: Vim(let):Error invoking '0:function:DbeeCallStoreResult' on channel 3:
res.Format: cr.Rows: cache flushing timeout exceeded: context deadline exceeded
stack traceback:
    [C]: in function 'DbeeCallStoreResult'
    ...ocal/share/nvim/lazy/nvim-dbee/lua/dbee/handler/init.lua:311: in function 'call_store_result'
    .../.local/share/nvim/lazy/nvim-dbee/lua/dbee/api/core.lua:195: in function 'call_store_result'
    .../.local/share/nvim/lazy/nvim-dbee/lua/dbee.lua:90: in function 'store'
    .../.config/nvim/lua/plugins/dbee.lua:19: in function 'on_confirm'
    ...mount_nvim.a5vxWOb/usr/share/nvim/runtime/lua/vim/ui.lua:105: in function 'input'
    .../.config/nvim/lua/plugins/dbee.lua:17: in function <.../.config/nvim/lua/plugins/dbee.lua:16>

The version is:

    ● nvim-dbee
        dir    .../.local/share/nvim/lazy/nvim-dbee
        url    https://github.com/kndndrj/nvim-dbee
        branch master
        commit 85622c8

The result of :checkhealth dbee:

dbee: require("dbee.health").check()

DBee report ~
- OK Binary version matches version of install manifest.