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

mnesia:table_info(Tab, size) returning undefined #5830

Closed
lhoguin opened this issue Mar 28, 2022 · 3 comments
Closed

mnesia:table_info(Tab, size) returning undefined #5830

lhoguin opened this issue Mar 28, 2022 · 3 comments
Labels
bug Issue is reported as a bug

Comments

@lhoguin
Copy link
Contributor

lhoguin commented Mar 28, 2022

Describe the bug
Something unexpected happens to some RabbitMQ users: mnesia:table_info(Tab, size) returns undefined.

Related ticket in the Prometheus.erl project: deadtrickster/prometheus.erl#133

The related code is very simple: loop over all tables, get the size and sum the sizes up: https://github.com/deadtrickster/prometheus.erl/blob/master/src/collectors/mnesia/prometheus_mnesia_collector.erl#L196-L201

To Reproduce
Don't know!

Expected behavior
I am trying to figure out whether this is a real issue or whether we should handle undefined in the code. Modifying the code to handle undefined is simple enough but if this would hide a deeper issue I would like to figure that out if possible.

So should we expect mnesia:table_info(Tab, size) to return undefined?

Affected versions
24 at least based on reports.

@dgud
Copy link
Contributor

dgud commented Mar 28, 2022

When the table should be loaded on the local node but is not yet loaded it will return undefined.

@lhoguin
Copy link
Contributor Author

lhoguin commented Mar 28, 2022

Perfect, then we will just handle it in the code. Thanks!

@lhoguin lhoguin closed this as completed Mar 28, 2022
@dgud
Copy link
Contributor

dgud commented Mar 28, 2022

I will NOT change this behavior since someone might have used that to check if a table is loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug
Projects
None yet
Development

No branches or pull requests

2 participants