id *args)
{
    DBT key, value;
    DB_TXN *txn;
    int i, j, payload, ret, thread_num;
    int retry_count, max_retries = 20;   /* Max retry on a deadlock */
    char *key_strings[] = {"key 1", "key 2", "key 3", "key 4",
                           "key 5", "key 6", "key 7", "key 8",
                           "key 9", "key 10"};

    DB *dbp = (DB *)args;
    DbEnv *envp = dbp-&amp;gt;get_env();

    /* Get the thread number */
    (void)pthread_mutex_lock(&amp;thread_num_lock);
    global_thread_num++;
 