Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

orgid -1 -> 0 #260

Closed
Dieterbe opened this issue Jul 30, 2016 · 7 comments
Closed

orgid -1 -> 0 #260

Dieterbe opened this issue Jul 30, 2016 · 7 comments
Assignees
Milestone

Comments

@Dieterbe
Copy link
Contributor

Dieterbe commented Jul 30, 2016

can we make the "special org", currently at id=-1 , id=0 instead?
this help to encode orgid's, we can make them uints and save space

the only use of -1 that i'm aware of is for "globally visible data" that any org can see.
and we currently don't use 0. (we do use 1 for the admin org), so this should be pretty easy

@woodsaj
Copy link
Member

woodsaj commented Jul 30, 2016

That is fine with me

@Dieterbe
Copy link
Contributor Author

Dieterbe commented Aug 1, 2016

k, this is low prio though, will probably address this at some point down the road.

@woodsaj
Copy link
Member

woodsaj commented Apr 4, 2018

So we cant use 0, as the metrics get rejected for being invalid.

https://snapshot.raintank.io/dashboard/snapshot/OM37FFnSW8MVfadRv1u13mJjR2ewR8ED?refresh=30s&panelId=1&fullscreen&orgId=2

@woodsaj
Copy link
Member

woodsaj commented Apr 4, 2018

So as discussed in the PR, we need to make the PublicOrgId configurable, but lets default to 0

@Dieterbe
Copy link
Contributor Author

Dieterbe commented Apr 8, 2018

I don't understand how you reason from the rejected-invalid problem to your proposal of "make the PublicOrgId configurable, but lets default to 0", as that would still not work because the default still would be rejected.
so it requires removing the org!=0 rule, which by itself should also solve this problem, so #882

@woodsaj
Copy link
Member

woodsaj commented Apr 8, 2018

I dont like the idea of removing the validation rule. It would be too easy for a bug to result in the orgId being the zero value. And this would result in all users being able to see the data being inserted.

So just make it configurable. a default of 0 can just be treated as public metrics being disabled.

@Dieterbe
Copy link
Contributor Author

#883

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

No branches or pull requests

2 participants