Back

[SOLVED] Update documents from MariaDb database

  • 0
  • Databases
  • Flutter
pitcairn1987
3 Jun, 2023, 05:50

Hi, I 've connected for tests to my mariadb database and try some updates on collections. Documents have been updated correctly. But when I call Appwrite getDocument(), I get old data. Is it safe operation, doing update directly in database?

TL;DR
A user was experiencing issues when updating documents from a MariaDB database using Appwrite. They were not seeing the updated data when using the Appwrite getDocument() function. Other users suggested clearing the cache using commands like `docker exec appwrite-redis redis-cli FLUSHALL` or restarting Appwrite. It was mentioned that modifying the database while Appwrite is running could result in corruption. Eventually, the user realized that they were using MongoDB instead of MariaDB, which is not compatible with Appwrite. The user was able to successfully update documents when using the correct database.
Bouahaza
3 Jun, 2023, 05:52

Appwrite isn't compatible with mongo

pitcairn1987
3 Jun, 2023, 08:56

sorry, I mean MariaDb:)

pitcairn1987
3 Jun, 2023, 08:56

Update documents from MariaDb database

Bouahaza
3 Jun, 2023, 09:02

Are you sure you save your modification on mariadb ? I just try and it works

Bouahaza
3 Jun, 2023, 09:03

It's not safe while it'll not trigger events, not count as "Usage" etc..

Bouahaza
3 Jun, 2023, 09:09

NB: I can reproduce. Appwrite manage cache via redis

Bouahaza
3 Jun, 2023, 09:09

I need to delete cache to see update

pitcairn1987
3 Jun, 2023, 09:40

How can I delete cache?

Bouahaza
3 Jun, 2023, 10:08

You need to connect to redis

D5
3 Jun, 2023, 10:17

Reatarting appwrite could clean cache, but not sure

D5
3 Jun, 2023, 10:18

Doesn't seem like a good idea modifying that with appwrite running (cold result in corruption)

Bouahaza
3 Jun, 2023, 10:18

docker exec appwrite-redis redis-cli FLUSHALL Should works too. It clear all cache

pitcairn1987
3 Jun, 2023, 11:55

Yes. It helps. Thanks!

Drake
3 Jun, 2023, 14:46

Keep in mind redis is used to queue events so if any events were still queued, they would be wiped.

Drake
3 Jun, 2023, 14:46

[SOLVED] Update documents from MariaDb database

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more