Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

create_if_missing may cover up the real problem #1037

Open
lukaszstolarczuk opened this issue Aug 9, 2021 · 1 comment
Open

create_if_missing may cover up the real problem #1037

lukaszstolarczuk opened this issue Aug 9, 2021 · 1 comment
Milestone

Comments

@lukaszstolarczuk
Copy link
Member

Consider example:

  • I create a testfile for engine cmap
  • I now try to create a testfile (within the same path) e.g. for engine radix, with create_if_missing flag set up
  • I got error Failed creating pool: file .../testfile already exists
    • while I expect to get something like Failed opening pool: wrong layout ("..."), pool created with layout "..."

So, to sum up - using create_if_missing flag may conceal from the user the real problem with their pool.
Perhaps we should print both errors (one from the open method and the other one, from the create method) if applicable.

@lukaszstolarczuk lukaszstolarczuk added Type: Bug new need to be triaged labels Aug 9, 2021
@igchor
Copy link
Contributor

igchor commented Sep 24, 2021

Hm, yes, I think this might be a good idea. We would just need to make sure that in the documentation we have stated exactly what happens for create_if_missing (first create, then open) and also to clear the error if the second call succeeds.

@lukaszstolarczuk lukaszstolarczuk removed the new need to be triaged label Aug 2, 2022
@lukaszstolarczuk lukaszstolarczuk added this to the 1.5 milestone Sep 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants