docs: private static int metaSync(final TSDB tsdb) throws Exception {
      final long start_time = System.currentTimeMillis() / 1000;
  
      // now figure out how many IDs to divy up between the workers
      final int workers = Runtime.getRuntime().availableProcessors() * 2;
      final Set<Integer> processed_tsuids = 
        Collections.synchronizedSet(new HashSet<Integer>());
      final ConcurrentHashMap<String, Long> metric_uids = 
        new ConcurrentHashMap<String, Long>();
      final ConcurrentHashMap<String, Long> tagk_uids = 
        new ConcurrentHashMap<String, Long>();
      final ConcurrentHashMap<String, Long> tagv_uids = 
        new ConcurrentHashMap<String, Long>();
  
      final List<Scanner> scanners = CliUtils.getDataTableScanners(tsdb, workers);
      LOG.info("Spooling up [" + scanners.size() + "] worker threads");
      final List<Thread> threads = new ArrayList<Thread>(scanners.size());
      int i = 0;
      for (final Scanner scanner : scanners) {
        final MetaSync worker = new MetaSync(tsdb, scanner, processed_tsuids, 
            metric_uids, tagk_uids, tagv_uids, i++);
        worker.setName("Sync #" + i);
        worker.start();
        threads.add(worker);
      }
  
      for (final Thread thread : threads) {
        thread.join();
        LOG.info("Thread [" + thread + "] Finished");
      }
      LOG.info("All metasync threads have completed");
      // make sure buffered data is flushed to storage before exiting
      tsdb.flush().joinUninterruptibly();
      
      final long duration = (System.currentTimeMillis() / 1000) - start_time;
      LOG.info("Completed meta data synchronization in [" + 
          duration + "] seconds");
      return 0;
    }