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

LayerConfiguration lookup with no layers #5128

Closed
fm3 opened this issue Feb 4, 2021 · 6 comments
Closed

LayerConfiguration lookup with no layers #5128

fm3 opened this issue Feb 4, 2021 · 6 comments

Comments

@fm3
Copy link
Member

fm3 commented Feb 4, 2021

We’ve had a single occurrence of this:

org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
Position: 194: ERROR: syntax error at or near ")"
Position: 194
Causing query: [select layerName, viewConfiguration
from webknossos.user_dataSetLayerConfigurations
where _dataset = ?
and _user = ?
and layerName in ()
]

The question mark is expected (displays passed parameters) but the () should never happen, it means an empty layer array was passed. Where did that come from?

@fm3 fm3 added the bug label Feb 4, 2021
@philippotto
Copy link
Member

Is there a connection to the recent change where we allowed a dataset to have zero layers? I'm a bit fuzzy on the details, but I think we changed something there.

@fm3
Copy link
Member Author

fm3 commented Feb 4, 2021

Possibly, that was #4959 – making it “unusable”/"unimported". Do you know if the front-end still asks for layer configurations when opening an unimported dataset?

@philippotto
Copy link
Member

Opening an "unimported" dataset should not be possible. But hitting "import" could open the edit/import view which fetches /api/dataSetConfigurations/default/${datasetId.owningOrganization}/${datasetId.name} as far as I can see.

@fm3
Copy link
Member Author

fm3 commented Feb 4, 2021

Hmm, no that route doesn’t lead to this query, only api/dataSetConfigurations/:organizationName/:dataSetName does.
I could not reproduce it with a zero-layer dataset, neither by clicking view nor import.
Maybe a race condition, the dataset was already open and then (possibly due to datastore downtime) it became a zero-layer dataset.
Since there has been only a single occurrence of this I’d say it’s not super important. I’ll change the query so that an empty layer list will not result in a syntax error. Do you agree?

@philippotto
Copy link
Member

Yes, sounds good 👍

@fm3 fm3 added the backend label Mar 26, 2022
@fm3
Copy link
Member Author

fm3 commented Jul 29, 2022

Closing this since there have been no reports of any errors concerning the layer configuration.

@fm3 fm3 closed this as completed Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants