diff options
author | Paul Joseph Davis <davisp@apache.org> | 2009-11-25 22:39:23 +0000 |
---|---|---|
committer | Paul Joseph Davis <davisp@apache.org> | 2009-11-25 22:39:23 +0000 |
commit | 03ec23ec19c5b1b9b865f26c6680a5327706a6c8 (patch) | |
tree | ebc381e9f389e82efb506d4cd0d71f628c8d2100 /src/couchdb | |
parent | 6f3bde270c686403d7b0434e84d37cb8fed405b2 (diff) |
Fixed a bug preventing active_dbs from working.
Thanks Jeff Macdonald for the report.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@884315 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_db_updater.erl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/couchdb/couch_db_updater.erl b/src/couchdb/couch_db_updater.erl index 94414f2e..1da07326 100644 --- a/src/couchdb/couch_db_updater.erl +++ b/src/couchdb/couch_db_updater.erl @@ -656,8 +656,10 @@ commit_data(#db{fd=Fd,header=OldHeader,fsync_options=FsyncOptions}=Db, Delay) -> if OldHeader == Header -> Db; Delay and (Db#db.waiting_delayed_commit == nil) -> - Db#db{waiting_delayed_commit= - erlang:send_after(1000, self(), delayed_commit)}; + Db2 = Db#db{waiting_delayed_commit= + erlang:send_after(1000, self(), delayed_commit)}, + ok = gen_server:call(Db2#db.main_pid, {db_updated, Db2}), + Db2; Delay -> Db; true -> @@ -680,9 +682,11 @@ commit_data(#db{fd=Fd,header=OldHeader,fsync_options=FsyncOptions}=Db, Delay) -> _ -> ok end, - Db#db{waiting_delayed_commit=nil, + Db2 = Db#db{waiting_delayed_commit=nil, header=Header, - committed_update_seq=Db#db.update_seq} + committed_update_seq=Db#db.update_seq}, + %ok = gen_server:call(Db2#db.main_pid, {db_updated, Db2}), + Db2 end. |