Commit Graph

49585 Commits (hiltontj/catalog-update-bug-2)

Author SHA1 Message Date
Trevor Hilton 15fcb35121 fix: off-by-one in catalog update logic 2025-03-12 11:30:13 -04:00
Jackson Newhouse a455598be6
feat(processing_engine): Implement Processing Engine Cache. (#26111) 2025-03-11 15:48:47 -07:00
Trevor Hilton 503819468e
feat: catalog checkpoints (#26126) 2025-03-11 18:20:36 -04:00
Trevor Hilton 72dc4458fd
chore: backport changes to catalog from enterprise (#26116)
* chore: backport changes to influxdb3_catalog crate

* chore: backport changes to influxdb3_cache crate

* chore: backport changes to influxdb3_write crate

* chore: backport changes to influxdb3_proc_eng crate

* chore: backport influxdb3 crate changes for catalog

* chore: backport changes to influxdb3_id crate

* chore: backport changes to influxdb3_wal crate

* chore: backport changes to influxdb3_clap_blocks crate

* chore: backport changes to influxdb3_client crate

* chore: backport influxdb3_server crate changes

* chore: fix after full backport

* fix: ordering of catalog broadcast
2025-03-11 12:11:51 -04:00
Trevor Hilton 36fd6a5609
chore: ignore humantime RUSTSEC-2025-0014 (#26121) 2025-03-11 09:25:27 -04:00
Trevor Hilton 586204d3cc
chore: disable release on merge to main for beta (#26115) 2025-03-10 17:14:45 -04:00
Jackson Newhouse 5fa417c3f0
feat: remove system-py (#26087)
* feat: remove system-py

* chore: allow Apache-2.0 WITH LLVM-exception license.
2025-03-10 11:10:33 -07:00
praveen-influx 5fda7277e7
chore: fix cargo audit failures (#26112)
- update ring (ring v0.17.8 -> v0.17.13)
- added paste crate (unmaintained) to ignore list
2025-03-10 13:26:33 +00:00
Michael Gattozzi 329ef2f11b
feat: allow new tags in schema again (#26108)
This commit restores the old behavior we had where new tags can be added
to a schema. To do this we made tags nullable and brings us in line with
our other products. These changes were made in this PR:

https://github.com/influxdata/influxdb3_core/pull/41.

Changes to accomplish this new behavior were:

- Queries now do not return an empty string for null tags instead they
  are returned as null, or in many formats not at all.
- References to v1 for parsing and validating lines were removed as we
  only have one path for doing so these days shared amongst all the
  write_lp endpoints.
- We fixed failing tests that expected us to not be able to have new
  tags or depended on that functionality indirectly
- Tests had their snapshot files updated to reflect that tags are
  nullable by default
- Behavior for making a schema and checking whether a column can be null
  were updated in a separate repo and integrated here
- The series_key is updated whenever we get a new tag added to the
  schema
- New tests were added to show that you can add a new tag and that the
  series key is updated as part of that

With the above changes we can now allow tags to be added again by users
like they would expect, especially with v1 and v2 apis and Telegraf
plugins.
2025-03-06 13:59:15 -05:00
praveen-influx c724e06e3f
feat: query path instrumentation (#26106)
- spans added for buffer, parquet chunks along with number of files that
  are already in parquet cache along with the sql
2025-03-06 17:24:34 +00:00
Jackson Newhouse 85023f075b
fix(processing_engine): fix retry behavior on batches to try individual batch. (#26105) 2025-03-05 15:23:25 -08:00
Jackson Newhouse a1f0f2b691
fix: add error_behavior to test matching expression. (#26101) 2025-03-04 11:09:34 -08:00
Jackson Newhouse c930d9eef8
feat(processing_engine): error handling for triggers. (#26086) 2025-03-04 09:32:58 -08:00
Jackson Newhouse 357c05f3d0
feat(processing_engine): Support Flask semantics for responses from request plugins. (#26095) 2025-03-04 09:00:59 -08:00
praveen-influx e46d3b8881
chore: rust ci job fix to address rustup 1.28.0 changes (#26099)
- activate toolchain explicitly
- add clippy and rustfmt components
2025-03-04 11:44:58 +00:00
wayne 750387912e
fix: ensure active toolchain installation in Dockerfile (#26097) 2025-03-04 09:31:29 +00:00
wayne d1711d284a
fix: test case introduced by #26094 (#26096) 2025-03-03 17:27:23 -07:00
wayne e00e0f1a86
fix: allow equal sign in plugin trigger arguments (#26094) 2025-03-03 13:06:35 -07:00
wayne e2c3e7c8c8
feat: improve CLI list arg consistency (always use commas) (#26088)
* chore: eliminate SeparateList, use comma-delimited flag list options everywhere
* fix: remove num_args attribute from comma-delimited args
2025-03-03 12:52:13 -07:00
wayne a84c4a9a8b
fix: ensure "local" ObjectStore.list returns ordered elements (#26081) 2025-02-28 10:46:44 -07:00
Jackson Newhouse 208b82a32d
fix(processing_engine): Use default globals so that builtins are automatically included. (#26072) 2025-02-27 16:11:08 -08:00
Jamie Strandboge a82c13c260
chore: update to python 3.11.11+20250212 for libssl (#26049)
References:
- https://github.com/astral-sh/python-build-standalone/releases/tag/20250212
- https://github.com/astral-sh/python-build-standalone/commits/20250212/
2025-02-27 10:21:05 -06:00
Trevor Hilton d8efdb4024
Revert "chore: fix shellcheck lints (#25956)" (#26067)
This reverts commit 891da53382.
2025-02-26 16:29:05 -05:00
Jamie Strandboge aa09d761a0
chore: clean up runtime code for python setup (#26042)
* chore: clean up runtime code for python setup

ccd5d22aab introduced working but temporary code for setting up the
python runtime environment. This cleans that up:

* refactor various find_python() functionality into virtualenv.rs
* refactor PYTHONHOME calculation to virtualenv.rs:find_python_install()
* adjust init_pyo3() to temporarily set PYTHONHOME based on
  virtualenv.rs:find_python_install() as this is the only place it is
  needed (indeed, venv activation scripts try to remove it)

Importantly, virtualenv.rs:find_python_install() tries to find the
python build standalone runtime based on a few heuristics. This function
could be improved in the fullness of time to, eg, be configured via a
build parameter.

Also, virtualenv.rs:find_python() can be used pre and post venv
activation. Before entering the venv, it will use find_python_install()
which is useful for things like setting up the initial venv. After
entering the venv, it will honor VIRTUAL_ENV (as set by
virtualenv.rs:initialize_venv()) to find python, which is important for
install packages with pip and having them installed into the venv.

* chore: update README_processing_engine.md for default venv

* chore: add bug reference for venv migrations with python minor releases

* chore: add security URLs to README_processing_engine.md

* chore: find_python_home() returns Option<PathBuf>. Thanks Jackson Newhouse

* fix: manually set sys.prefix, exec_prefix and sys.path

When activating a venv in the shell, sys.base_prefix and
sys.base_exec_prefix should be set to the installation location while
sys.prefix and sys.exec_prefix should be set to the venv dir.
Unfortunately, when initialize_venv() and init_pyo3() are called, we
can't use Py_InitializeFromConfig() to set any of these and certain
platforms are unable to find python-build-standalone. For now, we'll
temporarily set PYTHONHOME in init_pyo3() to the installation location
to make python work. By setting it at this point in the code, sys.prefix
and sys.exec_prefix end up also being set to the installation location,
which is fine when not under a venv, but is different from when entering
an venv.

To address this, in PYTHON_INIT.call_once() and when VIRTUAL_ENV is set
(which initialize_venv() will have set at this point), manually set
sys.prefix and sys.exec_prefix to what is in VIRTUAL_ENV.

Similarly, when activating a venv in the shell, sys.path is appended to
have the venv's site-packages dir. Previously we were setting PYTHONPATH
in initialize_venv() which ensures that the venv's site-packages dir is
in sys.path, but this ends up having the venv's site-packages dir first
in sys.path. To correct this, don't set PYTHONPATH any more and instead
adjust PYTHON_INIT.call_once() to append the venv's site-packages dir to
sys.path when VIRTUAL_ENV is set.

Finally, when exiting init_pyo3(), unconditionally unset PYTHONHOME when
VIRTUAL_ENV is set (like activation scripts do) and restore/unset when
it isn't.

Prior to these changes, all target incorrectly had the venv's
site-packages first in sys.path and OSX and Windows additionally had an
incorrect sys.prefix and sys.exec_prefix. With these initialization
changes in place, the runtime environment for the plugins is much closer
to that of a shell activated venv.
2025-02-26 12:06:23 -06:00
Adam Curtis 891da53382
chore: fix shellcheck lints (#25956)
Removed all of the shellcheck complaints that were showing up in my
editor.

Where possible, I just fixed them directly but I just told it to ignore
this one in the install scripts https://www.shellcheck.net/wiki/SC2059

Happy to go and fix that lint too I just wasn't sure if we prefer the
current approach, since it doesn't seem to be causing any problems.
2025-02-23 14:01:46 +13:00
wayne 044c051aaa
chore: update Dockerfile to RUST_VERSION=1.85, install libz-dev (#26053) 2025-02-21 14:41:04 -07:00
Jackson Newhouse f4b3fae186
feat(processing_engine): Have automatic plugin dir at /plugins for docker. (#26047) 2025-02-21 10:09:51 -08:00
Michael Gattozzi 1f72bfcc33
feat: Update to Rust 1.85 and 2024 Edition (#26046) 2025-02-20 14:58:07 -05:00
praveen-influx f1fc498dbf
feat: updates to default memory settings (#26023)
- breaking change, replaced `--parquet-mem-cache-size-mb` and env var for
  it with `--parquet-mem-cache-size` (takes value now in percentage or
  MB), now defaults to 20% of total available memory
- force snapshotting is set at 50%
- datafusion mem pool is set to 20%

closes: https://github.com/influxdata/influxdb/issues/26009
2025-02-20 16:03:30 +00:00
Jamie Strandboge 1d35695951
fix: prefer pip over over uv (#26039)
Official builds build with python build standalone currently only work
with pip. Until https://github.com/influxdata/influxdb/issues/26016 is
decided upon, prefer pip instead of uv.
2025-02-19 13:49:22 -06:00
Jamie Strandboge 42117701c0
fix: properly perform venv activation on windows (#26038) 2025-02-19 10:40:08 -06:00
Jamie Strandboge f5ae1bc64e
fix: detect python runtime for PipManager and venv setup (#26029)
* fix: consider PYTHONHOME when detecting PipManager

* fix: consider VIRTUAL_ENV when setting path to python from venv
2025-02-18 10:58:17 -05:00
peterbarnett03 692ae08900
chore: slight wording update (#26033) 2025-02-18 09:06:51 -06:00
Jamie Strandboge d9f4a8811e
fix: rename install_influxdb3.sh to install_influxdb.sh (#26032)
While the url is https://www.influxdata.com/d/install_influxdb3.sh, what
is copied over to this url must (currently) be named install_influxdb.sh
from this repo otherwise we get a 404. Thanks Pete Barnett for
troubleshooting.
2025-02-18 08:54:57 -06:00
wayne 8daccb7ee8
fix: add SpanContext with TraceCollector to query_sql call (#26006) 2025-02-13 18:43:25 -07:00
Jamie Strandboge 7192aae536
fix: download aarch64 python with docker/arm64 (#26021)
https://github.com/influxdata/influxdb/issues/26020
2025-02-13 16:55:29 -06:00
Jamie Strandboge ccd5d22aab
feat: build and use python-build-standalone with official builds (#25969)
* feat(ci): fetch and configure for python-build-standalone binaries

* fix: make the process engine usable on windows

* feat(ci): build with python-build-standalone (and drop musl)

* fix(ci): set rpath on Linux and libpath on OSX in ci

* fix: set PYTHONHOME everywhere and PYTHONPATH on Windows

* chore(ci): update to use more recent ci-packager-next

* fix(ci): adjust validate to allow certain dynamically linked libraries

* chore: remove install_influxdb.sh (using install_influxdb3.sh instead)

* chore(install_influxdb3.sh): update for processing engine and release builds

* fix: temporarily use rpm --nodeps until compile with old GLIBC

* feat(ci): build docker with python-build-standalone

* chore: add README_processing_engine.md

* chore: add a few more details to README_processing_engine.md

* fix(ci): use patchelf --set-rpath

Not all patchelf versions support --add-rpath for appending to the
RPATH, but --set-path can be used with a colon-separated list. Use
--set-rpath first for maximum compatibility.

* chore: update README_processing_engine.md for standalone local builds

* fix(Dockerfile): also use patchelf --set-rpath

* chore: update code comment for accuracy

* chore: typos, grammar and formatting change in README_processing_engine.md

* chore: update README_processing_engine.md for Docker arm64 (thanks Jackson)
2025-02-13 16:16:05 -06:00
Jackson Newhouse 962e31df47
feat(processing_engine): Ensure that plugin errors are logged, not thrown. (#26019) 2025-02-13 12:07:18 -08:00
Jackson Newhouse b0a24220c0
feat(processing_engine): Allow async plugin execution. (#25994) 2025-02-13 09:08:19 -08:00
Trevor Hilton 8548410d67
test: query distinct cache via flight sql (#26014) 2025-02-13 11:13:09 -05:00
Jackson Newhouse 80de52f15f
fix(processing_engine): Update Dockerfile and pip installer so pip works. (#25987) 2025-02-11 09:08:01 -08:00
Trevor Hilton 9646691d96
fix: serialize distinct cache in catalog (#25990)
The distinct cache info for tables was not serialized in the catalog.
This fixes it, but also updates the catalog serialization to use the
snapshot type serialization from the Catalog type all the way down.

The Eq and PartialEq impls were removed from Catalog and InnerCatalog
as they were only used in tests, and wer replaced by pure insta snapshot
tests.

A test was added to check that the distinct cache serializes/deserializes
2025-02-11 11:04:31 -05:00
Trevor Hilton 04f10ad290
fix: distinct cache panic on projection pushdown (#25988)
Fixed a bug in the distinct cache where projection that skipped column
in the cache hierarchy caused a panic.

This simplifies the display of the projection in the DistinctCacheExec
in EXPLAIN output to not include the column index, and only the name.
2025-02-11 09:22:54 -05:00
peterbarnett03 dca5350b10
fix: docker command was wrong (#25984) 2025-02-10 15:13:29 -05:00
Trevor Hilton f5b561b6c9
refactor: use macro to define id types (#25986)
* refactor: use macro to define catalog id types

* refactor: make catalog table limit test faster
2025-02-10 14:30:17 -05:00
clia c94237942e
fix: typo in influxdb3 client docs (#25977) 2025-02-09 21:10:33 -05:00
Michael Gattozzi cf1dd5c831
fix: broken format for JSON queries and add tests (#25980)
In #25927 we missed that JSON queries were broken despite having some
tests use the format. This fixes JSON queries such that they now
properly contain a comma between RecordBatches. This commit also
includes tests for the formats that now stream data back (CSV, JSON, and
JSON Lines) so that we won't run into this issue again.
2025-02-06 20:25:18 -05:00
Trevor Hilton 1ac67a3ca1
fix: remove request uri from error log (#25981) 2025-02-06 14:47:22 -05:00
Trevor Hilton c9f4d45937
chore: backport change from enterprise (#25978) 2025-02-06 12:42:50 -05:00
praveen-influx 6ca3411862
chore: remove log line (#25976) 2025-02-05 22:23:46 +00:00