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

Issue saying the database is readonly #6983

Closed
lbernardomaia opened this issue Nov 9, 2023 · 6 comments
Closed

Issue saying the database is readonly #6983

lbernardomaia opened this issue Nov 9, 2023 · 6 comments
Labels
bad error message customer issue question Further information is requested

Comments

@lbernardomaia
Copy link

lbernardomaia commented Nov 9, 2023

Hi,

I've been running dolt (v0.35.7) along with a small app for some time without issues, after upgrading the dolt version (I tried v1.15.0 and v1.25.0) started to see the following issue while ingesting data into Dolt.

The app first runs call dolt_reset("--hard"); and then runs a bunch of inserts programmatically via Python using a MySQL db connection.

Before the actions above, the db schema is created using the dolt cli.

The issue: Error happens when trying to insert the data: 1105 (HY000): cannot update manifest: database is read-only

Is the cause of this issue known?

I found this issue (#6460), not sure if it's related.

Thanks

@timsehn
Copy link
Sponsor Contributor

timsehn commented Nov 9, 2023

You have to run dolt migrate on the database. It is a different storage format now. The good news is it will be much faster after you do it :-)

@timsehn timsehn added question Further information is requested bad error message labels Nov 9, 2023
@lbernardomaia
Copy link
Author

Hi @timsehn,

I'm using empty storage, so when I ran dolt migrate I got database has already been migrated

@timsehn
Copy link
Sponsor Contributor

timsehn commented Nov 9, 2023

Hmmm. So you reset to the init commit and then insert data?

@timsehn
Copy link
Sponsor Contributor

timsehn commented Nov 9, 2023

Can I get more information about how you connect and what exactly you do? Is the code public?

@lbernardomaia
Copy link
Author

lbernardomaia commented Nov 10, 2023

Hi,

I refactored some things to simplify the data ingestion and mitigate possible problems.

Here is what the workflow now looks like:

  1. The App starts and the schema is created (if not already created) by the dolt CLI and dolt sql-server is executed to allow MySQL connections via Python.
  2. The data ingestion process is triggered
  3. The tables in the db are deleted (delete from ...) using a MySQL connection with Python.
  4. A loop starts to insert data into the DB (around ~200k lines) in chunks of 10k using a MySQL connection with Python.
  5. The dolt_commit is executed

Usually, the first loop in step 4 works fine and the data is inserted fine. The second one fails, giving the error I posted above.

Something I noticed is that the issue is intermittent, so if I delete the dolt folder and start from scratch or just stop and restart the app, the data ingestion might work fine after a few tries.

@lbernardomaia
Copy link
Author

lbernardomaia commented Dec 5, 2023

Hi,

I'm closing this issue as I could overcome the problem.

The app I described above and the db start (dolt sql-server...) were running in two different containers making use of a
storage system that was using NFS. After the NFS was replaced by the OpenEBS, the issue was sorted out.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad error message customer issue question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants