-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Environment:OS:
node.js / npm versions:
Additional info:
-
None
-
None
-
Developer Tools
In relation to this PR which is likely merged by the time you read this:
We currently infer namespaces from privileges at the same time as doing listDatabases() and listCollections() regardless of whether it succeeds or fails.
Any namespace found only in privileges then becomes an inferred collection which we then display as a "ghost" collection.
The problem right now is that we can't tell by the time we render these whether it exists or not.
However, if listCollections() succeeded, then any collections that came only from privileges are guaranteed to not exist. But right now we don't take this into account and therefore all way can say in the sidebar as that the inferred collections may or may not exist. If we did, then at least in some cases we could say they definitely don't.
Alternatively we could also only infer from privileges if the corresponding listDatabases() or listCollections() call fails due to a permission error. Then we won't have collections that may or may not exist showing up. (Although there might be an edge case in terms of creating a collection?) This might make the common case where users DO have listCollections() permissions faster or at least place less load on the server. But it does add latency in the case where users don't have listCollections() permissions. Which is probably very uncommon overall.
OR we could just continue to live with all inferred namespaces saying "Your privileges grant you access to this namespace, but it might not currently exist."
- related to
-
COMPASS-9572 Add setting so users can disable showing "ghost" dbs/collections
-
- Closed
-