change xapian read database to thread safety