[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

ffd->txn_dir_cache

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 13 Jul 2011 19:10:04 +0300

From svn_fs_fs__initialize_txn_caches()

[[[
  /* We don't support caching for concurrent transactions in the SAME
   * FSFS session. Maybe, you forgot to clean POOL. */
  if (ffd->txn_dir_cache != NULL || ffd->concurrent_transactions)
    {
      ffd->txn_dir_cache = NULL;
      ffd->concurrent_transactions = TRUE;

      return SVN_NO_ERROR;
    }

  SVN_ERR(create_cache(&ffd->txn_dir_cache, ...));
]]]

So:

2. Presumably create_cache() should be guarded by 'if (!ffd->concurrent_transactions)'.

3. This writes to an int (ffd->concurrent_transactions) concurrently from
   multiple threads. Shouldn't it be using an atomic type instead?

1. Couldn't we simplify this code by taking advantage of ID's being txn-specific?

   283606893804/ <_0.0.t6-7>
   283974816614/ <0-4.0.r4/0>
Received on 2011-07-13 18:11:22 CEST

This is an archived mail posted to the Subversion Dev mailing list.