Set the vbucket state after warmup is complete
Set the vbucket state after warmup is complete

     ==================
     WARNING: ThreadSanitizer: data race (pid=49270)
     Read of size 8 at 0x7d900001c000 by thread T4:
     #0 vbucket_state** std::__uninitialized_copy<false>::__uninit_copy<__gnu_cxx::__normal_iterator<vbucket_state* const*, std::vector<vbucket_state*, std::allocator<vbucket_state*> > >, vbucket_state**>(__gnu_cxx::__normal_iterator<vbucket_state* const*, std::vector<vbucket_state*, std::allocator<vbucket_state*> > >, __gnu_cxx::__normal_iterator<vbucket_state* const*, std::vector<vbucket_state*, std::allocator<vbucket_state*> > >, vbucket_state**) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_construct.h:75 (ep-engine_ep_unit_tests+0x0000006e3980)
     #1 Warmup::populateShardVbStates() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/warmup.cc:1030 (ep-engine_ep_unit_tests+0x00000067999a)
     #2 Warmup::initialize() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/warmup.cc:459 (ep-engine_ep_unit_tests+0x0000006797ec)

      Previous write of size 8 at 0x7d900001c000 by thread T12 (mutexes: write M119516, write M119521):
      #0 KVStore::updateCachedVBState(unsigned short, vbucket_state const&) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/kvstore.cc:122 (ep-engine_ep_unit_tests+0x0000006ade1c)
      #1 ForestKVStore::snapshotVBucket(unsigned short, vbucket_state&, VBStatePersist) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/forest-kvstore/forest-kvstore.cc:1413 (ep-engine_ep_unit_tests+0x0000006e4249)
      #2 EventuallyPersistentStore::persistVBState(unsigned short) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/ep.cc:1355 (ep-engine_ep_unit_tests+0x0000005b0fb8)
      #3 VBStatePersistTask::run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/tasks.cc:55 (ep-engine_ep_unit_tests+0x000000660a55)
      #4 ExecutorThread::run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/executorthread.cc:113 (ep-engine_ep_unit_tests+0x000000616ef1)
      #5 launch_executor_thread(void*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/executorthread.cc:31 (ep-engine_ep_unit_tests+0x000000616aa5)
      #6 platform_thread_wrap(void*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/platform/src/cb_pthreads.cc:54 (libplatform.so.0.1.0+0x00000000586b)

Change-Id: I4e807ac9a23baf9e4d352f13ef65f3f5a345cd60
Reviewed-on: http://review.couchbase.org/66050
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Dave Rigby <a09264da4832c7ff1d3bf1608a19f4b870f93750@couchbase.com>

membase/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,membase/ep-engine,couchbase/ep-engine,couchbase/ep-engine,daverigby/kv_engine,couchbase/ep-engine,teligent-ru/ep-engine,daverigby/ep-engine,daverigby/kv_engine,teligent-ru/ep-engine,daverigby/ep-engine,daverigby/ep-engine,membase/ep-engine,daverigby/ep-engine,daverigby/kv_engine,daverigby/kv_engine,teligent-ru/ep-engine,membase/ep-engine