Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index Storage Parameter - Validation issue #1472

Open
AThilenius opened this issue Feb 22, 2023 · 1 comment · May be fixed by #1648
Open

Index Storage Parameter - Validation issue #1472

AThilenius opened this issue Feb 22, 2023 · 1 comment · May be fixed by #1648
Assignees

Comments

@AThilenius
Copy link

This line right here checks for validity of a PSQL Index Storage Parameter during inspection. I'm no PSQL expert, but it seems like this storage parameter is just a generic string and only has meaning in the context of what ever index type is using it? Is there any way to treat these as opaque blobs in Atlas, or MUST they be parsed?

We use ZomboDB which has very bespoke syntax for defining cross-indexes via the Index Storage Parameters, and Atlas chokes with the error invalid index storage parameter: options=customers:(customer_id=<public.customers.idx_zdb_customers>id)

Replicating this would require you setup both ZomboDB and an Elastic instance, so it's not super straightforward. But the below SQL would cause the issue:

-- Simple parent tables
create table parent (id serial primary key);

-- Single child table for a 1:m relationship
create table child (
    id serial primary key,
    parent_id integer constraint fk_parent_id references parent
);

-- Index for both parent and child tables individually
create index idx_zdb_parent on parent using zombodb ((parent.*)) with (url='http:dokku.elasticsearch.stage:9200/');
create index idx_zdb_child on child using zombodb ((child.*)) with (url='http:dokku.elasticsearch.stage:9200/');

-- The problematic cross-join index, it doesn't like the two `=` occurrences.
alter index idx_zdb_parent set (options='children:(parent_id=<public.parent.idx_zdb_parent>id)');

Note: this issue is from this Discord thread.

@a8m a8m self-assigned this Feb 28, 2023
@AThilenius
Copy link
Author

Hi @a8m what can I do to help on this issue? My GoLang isn't strong enough to start really ripping into this. We would still really love to start using Atlas though 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants