I got a starnge behavior - I was trying to rename a db file (os rename) after closing the database - a subsequent db_put or db_open was returning a error - error 2 i.e ENOENT . After changing it to db->rename the problem seems to have gone away. I was wonderning what could be the reason.
I have muliple CDS databases in an environment. When the number of records in the database exceeds a certain predefined value - we ensure all cursors are closed, close the database, rename the file and open a new database with the file name (our implementation of partitioning).