• Binbin's avatar
    Call emptyData when disk-based sync rdbLoad fails (#12510) · 0e5a4a27
    Binbin authored
    We doing this in diskless on-empty-db mode, when diskless
    loading fails, we will call emptyData to remove the half-loaded
    data in case we started with an empty replica.
    
    Now when a disk-based sync rdbLoad fails, we will call emptyData
    too in case it loads partially incomplete data.
    
    when the replica attempts another re-sync, it'll empty the dataset
    again anyway, so this affects two things:
    1. memory consumption in the time gap until the next rdb loading begins
    2. if the unsynced replica is for some reason promoted, it would have kept
      the partial dataset instead of being empty.
    0e5a4a27
replication.c 171 KB