在Collection上创建索引,然后重命名Collection

时间:2015-05-26 17:49:03

标签: mongodb wiredtiger

列出了我们系统中的当前工作流程

  • 使用名称TMP_xxxx创建集合。
  • 在TMP_xxx上创建索引(后台模式)。
  • 写完所有文件后,将收藏重命名为XXX(for 事务性读取一致性。)。

重命名集合时,索引是否重新映射到新名称,还是应该触发reindex操作?

我们经常发现此错误

2015-05-24T21:27:18.667+0000 I INDEX    [repl index builder 1262] build index done.  scanned 34 total records. 0 secs
**2015-05-24T21:27:18.668+0000 E INDEX    [repl index builder 1299] IndexBuilder could not build index: Location28550 Unable to complete index build as the collection is no longer readable**
2015-05-24T21:27:18.668+0000 I -        [repl index builder 1299] Fatal Assertion 28555
2015-05-24T21:27:18.711+0000 I CONTROL  [repl index builder 1299]

这是否意味着,在创建索引之前重命名了该集合?

我们最近切换到了WiredTiger存储引擎,并开始注意到这个问题。

0 个答案:

没有答案