You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Li Zhengji (JIRA)" <ji...@apache.org> on 2008/06/25 08:26:44 UTC

[jira] Created: (COUCHDB-86) (CouchDB on Windows) compaction can not be done.

(CouchDB on Windows) compaction can not be done.
------------------------------------------------

                 Key: COUCHDB-86
                 URL: https://issues.apache.org/jira/browse/COUCHDB-86
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
    Affects Versions: 0.8
         Environment: Windows XP, 		 Erlang/OTP R12B-3
            Reporter: Li Zhengji


During compacting, rename the current DB file to a .old file is not allowed on Windows.

A possible workaround for this could be: 
1. Close current DB file (.couch);
2. Send db_updated to update to use .compact;
3. After 5sec, delete the .couch file;  ---- This is done in a linked process, after that, this process send a message to update_loop;
4. After received the message in update_loop, close current DB file which is a .compact file, then rename it to .couch;
5. Finally, db_updated again to use this new .couch file.

Maybe, there would be a "pause" in service?



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (COUCHDB-86) (CouchDB on Windows) compaction can not be done.

Posted by zh...@t3gt.com.
The problem is how to set this flag FILE_SHARE_DELETE when calling
CreateFile. To modify BEAM VM source code and rebuild it?

I think that another method should be found to smooth the upgrading of
.couch file with its compaction version.



|---------+---------------------------->
|         |           Darren New       |
|         |           <dn...@san.rr.com>|
|         |                            |
|         |           2008-06-26 00:14 |
|         |           Please respond to|
|         |           couchdb-dev      |
|---------+---------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                              |
  |       To:       couchdb-dev@incubator.apache.org                                                                             |
  |       cc:                                                                                                                    |
  |       Subject:  Re: [jira] Created: (COUCHDB-86) (CouchDB on Windows) compaction can not be done.                            |
  >------------------------------------------------------------------------------------------------------------------------------|




Li Zhengji (JIRA) wrote:
> During compacting, rename the current DB file to a .old file is not
allowed on Windows.

If the problem is with renaming the file because it is open, you can do
this on Windows (with NTFS at least) by opening the file with the
correct mode.

You have to have every open of the file add delete/rename permissions to
the CreateFile calls that open that file. It's not disallowed, it's that
you've asked it to be disallowed. It's a one-flag change to make it
allowed.

--
Darren New / San Diego, CA, USA (PST)
  Helpful housekeeping hints:
   Check your feather pillows for holes
    before putting them in the washing machine.



Re: [jira] Created: (COUCHDB-86) (CouchDB on Windows) compaction can not be done.

Posted by Darren New <dn...@san.rr.com>.
Li Zhengji (JIRA) wrote:
> During compacting, rename the current DB file to a .old file is not allowed on Windows.

If the problem is with renaming the file because it is open, you can do 
this on Windows (with NTFS at least) by opening the file with the 
correct mode.

You have to have every open of the file add delete/rename permissions to 
the CreateFile calls that open that file. It's not disallowed, it's that 
you've asked it to be disallowed. It's a one-flag change to make it allowed.

-- 
Darren New / San Diego, CA, USA (PST)
  Helpful housekeeping hints:
   Check your feather pillows for holes
    before putting them in the washing machine.