diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2010-06-12 19:14:16 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2010-06-12 19:14:16 +0000 |
commit | f78b21bb145e2ff1d870b779a3aec6596aafc9d8 (patch) | |
tree | 4a9c29ebef86639ec01b91196278c215ffc9d59c /src/couchdb/couch_db_updater.erl | |
parent | d8ac0bba6b98cf22d6a8860ea7ad01de001971c5 (diff) |
more efficient header commits. COUCHDB-767
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@954044 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db_updater.erl')
-rw-r--r-- | src/couchdb/couch_db_updater.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/couchdb/couch_db_updater.erl b/src/couchdb/couch_db_updater.erl index 664b1e97..9a5476e8 100644 --- a/src/couchdb/couch_db_updater.erl +++ b/src/couchdb/couch_db_updater.erl @@ -681,6 +681,7 @@ commit_data(Db, true) -> commit_data(Db, _) -> #db{ fd = Fd, + filepath = Filepath, header = OldHeader, fsync_options = FsyncOptions, waiting_delayed_commit = Timer @@ -691,14 +692,14 @@ commit_data(Db, _) -> Db; Header -> case lists:member(before_header, FsyncOptions) of - true -> ok = couch_file:sync(Fd); + true -> ok = couch_file:sync(Filepath); _ -> ok end, ok = couch_file:write_header(Fd, Header), case lists:member(after_header, FsyncOptions) of - true -> ok = couch_file:sync(Fd); + true -> ok = couch_file:sync(Filepath); _ -> ok end, |