-2

My databases (mongodb and mysql) are declared as StatefulSet in yaml files. Backend framework is django. If I define functions that perform write operations (edit or delete) as async, it gonna be thread safe, right? Should I use locks or mutexes?

Milo Lu
  • 3,176
  • 3
  • 35
  • 46

1 Answers1

0

The same way you would do it anywhere else. MySQL offers many flavors and modes of transactional safety, which you use depends on your data structures and needs. Mongo is a little less complex but offers plenty of at least hypothetically transactional options.

coderanger
  • 52,400
  • 4
  • 52
  • 75