Search code examples
citus

Syncing data to Node that was offline while INSERT-ing (Citus)


I have set my replicaton_factor in Citus to 2 so every node has every data in case that if one Node gets a failure (goes offline) I can stil get all the data.

The problem I have is: I don't know how to get data inside of a node that failed while I was using INSERT or UPDATE and adding data to the DB? I have two Nodes and one Coordinator so basically after Node1 went offline and I added data to the DB Node2 got the data. Now I need to sync that data / shards to Node1 because at this time Node1 is basically useless.


Solution

  • Found the answer: This is done through master_copy_shard_placement https://citus-doc.readthedocs.io/en/latest/develop/api_udf.html#master-copy-shard-placement Enterprise is not required.