Hi!
Sometimes when converting DB from BDB to WiredTiger we get EBUSY when trying to truncate() index file.
The conversion code basically looks like the following:
=============================
system("rm -rf \"" WT_HOME "\" && mkdir \"" WT_HOME "\"");
wiredtiger_open(WT_HOME, NULL, "create,checkpoint=(wait=30)", &conn);
conn->open_session(conn, NULL, NULL, &session);
session->create(session, "table:main", "key_format=u,value_format=u,columns=(k,v)");
session->create(session, "index:main:index", "columns=(v)");
session->create(session, "index:main:index1", "columns=(v)");
/_ open BDB table, create cursor _/
while (/_ BDB cursor next() returns records _/) {
WT_ITEM ki, vi;
/_ fill ki and vi from BDB record _/
cursor->set_key(cursor, &ki);
cursor->set_value(cursor, &vi);
cursor->insert(cursor);
}
cursor->close(cursor);
session->truncate(session, "file:main_index.wti", NULL, NULL, NULL);
============================= END
The last truncate() call fails sometimes with EBUSY (Device or resource busy)
In cases where I saw this problem conversion takes quite a long time so probably it's somehow related to periodic checkpoints configured with 30 sec period.
I was able to reproduce it only on both 2.5.0 and develop.
Please advise!
- is related to
-
WT-1404 Test/format seeing EBUSY return in verify
- Closed
- related to
-
WT-2 What does metadata look like?
- Closed
-
WT-3 What file formats are required?
- Closed
-
WT-4 Flexible cursor traversals
- Closed
-
WT-5 How does pget work: is it necessary?
- Closed
-
WT-6 Complex schema example
- Closed
-
WT-7 Do we need the handle->err/errx methods?
- Closed
-
WT-8 Do we need table load, bulk-load and/or dump methods?
- Closed
-
WT-9 Does adding schema need to be transactional?
- Closed
-
WT-10 Basic "getting started" tutorial
- Closed
-
WT-11 placeholder #11
- Closed
-
WT-12 Write more examples
- Closed
-
WT-13 Define supported platforms
- Closed
-
WT-15 Automated build/test infrastructure
- Closed
-
WT-16 Test suite
- Closed
-
WT-17 Multithreaded tests
- Closed
-
WT-18 Coverage tests
- Closed
-
WT-19 Memory access / leak tests
- Closed
-
WT-20 API design
- Closed
-
WT-1767 If the session-level attempt to lock a handle gets EBUSY, fall back to the slow path
- Closed
-
WT-1782 Avoid EBUSY errors from truncate caused by checkpoints.
- Closed
-
WT-1598 Remove the schema, table locks
- Closed