david415 / mysql cluster tools
No description has been added.
Clone this repository (size: 64.2 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/david415/mysql-cluster-tools/
| commit 26: | b76e5799555b |
| parent 25: | bdb895216469 |
| branch: | default |
fixed a race condition
Changed (Δ1 byte):
raw changeset »
purge-binary-logs.py (2 lines added, 1 lines removed)
Up to file-list purge-binary-logs.py:
| … | … | @@ -91,6 +91,8 @@ def purge_binlogs(basedir, is_test=False |
91 |
91 |
slaves = get_slaves(localhost) |
92 |
92 |
busy_logfiles = get_busy_logs(slaves) |
93 |
93 |
|
94 |
logs = get_all_logs(basedir) |
|
95 |
||
94 |
96 |
# try to avoid a rare race condition by making sure |
95 |
97 |
# master's current bin log is in our busy_logfiles dictionary |
96 |
98 |
status = dbh_local.get_master_status() |
| … | … | @@ -119,7 +121,6 @@ def purge_binlogs(basedir, is_test=False |
119 |
121 |
|
120 |
122 |
dbh_local.close() |
121 |
123 |
|
122 |
logs = get_all_logs(basedir) |
|
123 |
124 |
|
124 |
125 |
for log in logs: |
125 |
126 |
if busy_logfiles.has_key(log): |
