Merge lp:~vkolesnikov/pbxt/pbxt-writer-compactor-deadlock into lp:pbxt

Proposed by Vladimir Kolesnikov on 2011-03-22
Status: Merged
Approved by: Paul McCullagh on 2011-03-22
Approved revision: 866
Merged at revision: 866
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-writer-compactor-deadlock
Merge into: lp:pbxt
Diff against target: 48 lines (+9/-4)
2 files modified
ChangeLog (+2/-0)
src/datalog_xt.cc (+7/-4)
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-writer-compactor-deadlock
Reviewer Review Type Date Requested Status
PBXT Core 2011-03-22 Pending
Review via email: mp+54331@code.launchpad.net
To post a comment you must log in.
Paul McCullagh (paul-mccullagh) wrote :

The patch looks good, I will merge...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2010-12-10 12:45:07 +0000
3+++ ChangeLog 2011-03-22 12:02:26 +0000
4@@ -3,6 +3,8 @@
5
6 ------- 1.0.11-8 Pre-GA - Not released yet
7
8+RN340: Fixed a deadlock between compactor and writer threads
9+
10 RN339: Fixed bug #677868: SHOW TABLE STATUS reports unappropriate value Max_data_length
11
12 RN338: PBMS integration updated. configure --with-pbms, not builds PBXT with PBMS.
13
14=== modified file 'src/datalog_xt.cc'
15--- src/datalog_xt.cc 2010-05-19 13:06:46 +0000
16+++ src/datalog_xt.cc 2011-03-22 12:02:26 +0000
17@@ -1909,6 +1909,11 @@
18 }
19 xt_unlock_mutex_ns(&db->db_datalogs.dlc_head_lock);
20
21+ /* Close open table if any before going to sleep because it might lock writer
22+ * and other threads that require exclusive table access
23+ */
24+ freer_(); // dl_free_compactor_state(&cs)
25+
26 /* Wait for the writer to write all the changes.
27 * Then we can start the delete process for the log:
28 *
29@@ -1923,10 +1928,9 @@
30 XTTableEntryPtr tab_ptr;
31 xtBool wait;
32
33- if (self->t_quit) {
34- freer_(); // dl_free_compactor_state(&cs)
35+ if (self->t_quit)
36 return FAILED;
37- }
38+
39 wait = FALSE;
40 xt_ht_lock(self, db->db_tables);
41 pushr_(xt_ht_unlock, db->db_tables);
42@@ -1962,7 +1966,6 @@
43 xt_throw(self);
44 }
45
46- freer_(); // dl_free_compactor_state(&cs)
47 return OK;
48 }
49

Subscribers

People subscribed via source and target branches