1

This is a question about MariaDB (mostly) and a replication that I am considering.

For this replication, the Primary database is updated every minute by a process which can take about 15 seconds to complete, each time. During these 15 seconds, the Primary database may not be completely consistent on each tables.

I want to set a Replica for this database on another server. On the Replica server, I expect to do some periodic post-processing on this database, which needs (preferably) the database to be in a consistent state (and maybe writing the results back to the Primary server, see this question).

Is there a way to know when the Replica has fully replicated this consistent state, or to force it to stay in this state, in order I can do the post-processing without errors?

(On the multiple servers I have, MariaDB versions can be 10.3.38 or 10.5.19 or 10.6.12. Servers are Linux Debian 10, Linux Debian 11 or Linux Ubuntu 22.04.3 LTS).

6
  • Seconds_behind_master is not definitive, but it is probably the best available. What the heck takes 15 minutes? Can that be sped up? Commented Aug 6, 2023 at 15:03
  • I said 15 seconds, not 15 minutes. Commented Aug 6, 2023 at 15:15
  • 1
    Inject (into an extra table) some indication that the periodic update is finished. Commented Aug 6, 2023 at 15:42
  • SQL Transactions are there to keep the database consistent whenever you need to do complex data modifications. Commented Aug 6, 2023 at 15:42
  • 1
    @GingkoFr - The general answer to those questions is " all will work correctly". However, since there are ways to bypass things, we would need to seep specifics to confirm it. Commented Aug 6, 2023 at 22:37

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.