Issue was that we use a lock function to lock sqlite client when doing
write ops, because only one thread should do them at a time. However,
the client init also requires a lock. When running ent version, ent init
had a function which would lock as well as be the first one to access
the client, hence deadlock on the client lock.
This issue was not there when running for the first time, because in
migration function we init clients without the locks. However when
running second time, the migration returns early, and does not int
clients hence the ent function deadlocks, and subsequently locks
everything that need the db access.
The fix is simple, in migration function move the client init before
return, so that we always have an initialized client and do not get
deadlocked in ent or non ent version.
Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
In some cases when limit was added to the sql query we would report more
results than that size was asked. This PR adds checks to never return
more results than the `size` parameter
- when creating an enrichment table, the `notify_update` is called
before the enrichment table stats is stored in the meta table.
- When pipeline reaches max retries and gets triggered again in the next
run, it uses one single time window for the whole delayed timerange.
Previously we did a footer check even when after all retries the blob
download was partial. Now we skip and return error, as no sense in
checking footer when we know the blob size is incomplete.
---------
Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
- [x] fix: alert can't query latest data for separate alert query
- [x] feat: add size limit for download from other nodes
- [x] fix: use real time id generator
- get file size from db and download file from blob
- if mismatch in size between db and file downloaded then
- get content length of file from blob
- if content length != file downloaded -> we had a partial download from
blob -> retry download with exponential backoff
- if content length == file downloaded -> check footer of downloaded
file to see if parquet in blob is actually corrupt
- if file is corrupt -> log as info and mark deleted in db
- if file is good -> update size in db
---------
Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
- Verify search results are triggered when pressing Cmd+Enter or
Ctrl+Enter
- Verify query executes with keyboard shortcut after clicking elsewhere
- Verify different query executes with keyboard shortcut
- Verify SQL query executes with keyboard shortcut
This adds the error header to all cases of internal server error so they
show up properly in audit. This is done by one of two approaches -
1. preferably using the `map_error_to_http_response` function , so that
everything goes via the same function
2. directly adding the header where the above function cannot be used
because is is not an error per say like trying to ingest at
non-ingester.
---------
Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
1. this PR fixes not showing what is the search field that was not found
in both logs page and dashbaords panel
2. alert list pagination fix
---------
Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
Refreshing in-memory cache in such NATs event trigger by NATs client's
callback closure.
---------
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>