This makes me nervous... Should be ok as long as we're in a locked transaction. We should double check that is the case for TokuDB, otherwise this would definitely cause a concurrency problem. Another possible strategy would be to hash the individual option ids and store that instead of an integer.