Author: damien
Date: Thu Jul 1 20:46:29 2010
New Revision: 959781
URL: http://svn.apache.org/viewvc?rev=959781&view=rev
Log:
Fix for windows fsync, race conditions in attachments.js and the default shell
used when launching windows CouchDB.
Modified:
couchdb/trunk/bin/couchdb.bat.tpl.in
couchdb/trunk/share/www/script/test/changes.js
couchdb/trunk/src/couchdb/couch_file.erl
Modified: couchdb/trunk/bin/couchdb.bat.tpl.in
URL:
http://svn.apache.org/viewvc/couchdb/trunk/bin/couchdb.bat.tpl.in?rev=959781&r1=959780&r2=959781&view=diff
==============================================================================
--- couchdb/trunk/bin/couchdb.bat.tpl.in (original)
+++ couchdb/trunk/bin/couchdb.bat.tpl.in Thu Jul 1 20:46:29 2010
@@ -17,8 +17,8 @@ rem First change to the drive with the e
rem then change to the erlang bin directory
cd %~dp0
-rem Allow a different erlang executable (eg, werl) to be used.
-if "%ERL%x" == "x" set ERL=erl.exe
+rem Allow a different erlang executable (eg, erl) to be used.
+if "%ERL%x" == "x" set ERL=werl.exe
echo CouchDB %version% - prepare to relax...
%ERL% -sasl errlog_type error -s couch
Modified: couchdb/trunk/share/www/script/test/changes.js
URL:
http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/changes.js?rev=959781&r1=959780&r2=959781&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/changes.js (original)
+++ couchdb/trunk/share/www/script/test/changes.js Thu Jul 1 20:46:29 2010
@@ -88,7 +88,10 @@ couchTests.changes = function(debug) {
waitForSuccess(function() {
lines = xhr.responseText.split("\n");
change1 = JSON.parse(lines[0]);
- change2 = JSON.parse(lines[1]);
+ change2 = JSON.parse(lines[1]);
+ if (change2.seq != 2) {
+ throw "bad seq, try again"
+ }
}, "bar-only");
T(change1.seq == 1)
@@ -106,6 +109,9 @@ couchTests.changes = function(debug) {
waitForSuccess(function() {
lines = xhr.responseText.split("\n");
change3 = JSON.parse(lines[2]);
+ if (change3.seq != 3) {
+ throw "bad seq, try again"
+ }
});
T(change3.seq == 3);
Modified: couchdb/trunk/src/couchdb/couch_file.erl
URL:
http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_file.erl?rev=959781&r1=959780&r2=959781&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_file.erl (original)
+++ couchdb/trunk/src/couchdb/couch_file.erl Thu Jul 1 20:46:29 2010
@@ -148,7 +148,7 @@ truncate(Fd, Pos) ->
%%----------------------------------------------------------------------
sync(Filepath) when is_list(Filepath) ->
- {ok, Fd} = file:open(Filepath, [read, raw]),
+ {ok, Fd} = file:open(Filepath, [append, raw]),
try file:sync(Fd) after file:close(Fd) end;
sync(Fd) ->
gen_server:call(Fd, sync, infinity).