mirror of
https://github.com/plausible/analytics.git
synced 2024-11-22 02:27:57 +03:00
Comparisons: Fix exports issue (#4756)
* Increase max_parser_depth setting This is currently causing issues in production with exports w/ comparisons, but would blow up in other cases with sufficient data. The reason this is now blowing up is that we create a large AND/OR condition for breakdown comparisons. ecto-ch nests each conditional in its separate parentheses causing us to reach the default 1000 max_parser_depth limit We can improve this in a couple of ways: - Not add unneccessary parentheses in ecto-ch - Adding a new operator to make the AND/OR nesting require less conditionals, using arrays and tuples instead * Don't query comparisons for exports csv exports don't actually output any comparison data, so querying for it just causes issues.
This commit is contained in:
parent
dd79ad3c22
commit
62fb285b71
@ -34,7 +34,7 @@ export default function StatsExport() {
|
||||
|
||||
function renderExportLink() {
|
||||
const interval = getCurrentInterval(site, query)
|
||||
const queryParams = api.serializeQuery(query, [{ interval }])
|
||||
const queryParams = api.serializeQuery(query, [{ interval, comparison: undefined }])
|
||||
const endpoint = `/${encodeURIComponent(site.domain)}/export${queryParams}`
|
||||
|
||||
return (
|
||||
|
@ -547,7 +547,8 @@ config :plausible, Plausible.ClickhouseRepo,
|
||||
transport_opts: ch_transport_opts,
|
||||
settings: [
|
||||
readonly: 1,
|
||||
join_algorithm: "direct,parallel_hash,hash"
|
||||
join_algorithm: "direct,parallel_hash,hash",
|
||||
max_parser_depth: 100_000
|
||||
]
|
||||
|
||||
config :plausible, Plausible.IngestRepo,
|
||||
|
Loading…
Reference in New Issue
Block a user