[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8710) mdb_copy wait for writer to complete

Full_Name: Muthukumar
Version: LMDB 0.82
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

# Writer

import lmdb

db_path = "test.db"
DB_MAX_SIZE = 40 * 1000 * 1000 * 1000
env = lmdb.Environment(db_path, DB_MAX_SIZE, sync=True)
txn = env.begin(write=True, buffers=True)
for i in xrange(5000000):
    value = "*" * 100
    txn.put("i="+str(i), value)

I ran the above python program in my machine which took almost 8 secs to
complete. Simultaneously i try to copy the database using mdb_copy, but it
started copying only after the write program completes its execution.

Please note: First i run the writer program then the mdb_copy, if i start
mdb_copy first it runs smoothly.

Please help.