cargomedia/CM — pull request #1450 by fauvel (2014-11-14 10:47:43+00:00)
Title: Splittest::_getVariationFixture might assign multiple variations

As reported by @NicolasSchmutz - his profile had multiple variations assigned, probably on multiple servers. I.e. he sees different variations when reloading.

Hypothesis:
- `CM_Model_Splittest::_getVariationFixture` is called concurrently on multiple servers
- Both threads *don't* see any variation in the database
- Both threads *create* a new variation (the latter replaced the former due to `REPLACE` query)
- Both threads write *their* variation into the local APC cache

Ideas:
- ~~Use shared instead of local cache (memcache) -> what's the performance impact?~~
- Use `INSERT` query and fail on duplicate rows, then somehow recover.

@tomaszdurka @alexispeter thoughts?