Redis should perform backup using BGSAVE not SAVE

Bug #1538334 reported by Peter Stachowski on 2016-01-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
High
Peter Stachowski

Bug Description

When Redis backup was implemented, using the save() command was chosen as it blocks, making the code simpler to read and understand. Unfortunately BGSAVE and SAVE have differences beyond one being synchronous and the other asynchronous, in that SAVE also blocks client connections while it runs. This behaviour is not optimal, so the code should be changed to use BGSAVE and wait until it completes.

Changed in trove:
assignee: nobody → Peter Stachowski (peterstac)

Fix proposed to branch: master
Review: https://review.openstack.org/272844

Changed in trove:
status: New → In Progress
Changed in trove:
milestone: none → mitaka-3
importance: Undecided → High
Amrith Kumar (amrith) on 2016-03-11
Changed in trove:
milestone: mitaka-3 → mitaka-rc1

Reviewed: https://review.openstack.org/272844
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=eecca3f9e88929b14ad78ed3e58f61b6dda55417
Submitter: Jenkins
Branch: master

commit eecca3f9e88929b14ad78ed3e58f61b6dda55417
Author: Peter Stachowski <email address hidden>
Date: Tue Jan 26 18:56:02 2016 -0500

    Redis should perform backup using BGSAVE not SAVE

    When Redis backup was implemented, using the save() command was
    chosen as it blocks, making the code simpler to read and understand.
    Unfortunately SAVE and BGSAVE have differences beyond one being
    synchronous and the other asynchronous, in that SAVE also blocks
    client connections while it runs. This behaviour is not optimal,
    so the code was changed to use BGSAVE and wait until it completes.

    In the case where bgsave() fails (possibly due to memory issues,
    save() is called so that the backup will still complete.

    The Redis helper was also modified to allow adding more data (to
    increase the time the backup takes) and tests were rearranged
    to improve chances of success.

    Change-Id: I75d9df54b8550b08ce0112e516c17fd717ebb857
    Closes-Bug: #1538334

Changed in trove:
status: In Progress → Fix Released

This issue was fixed in the openstack/trove 5.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers