[SERVER-12982] Could not restore backup data due to "key too large to index" Created: 01/Mar/14  Updated: 10/Dec/14  Resolved: 01/Mar/14

Status: Closed
Project: Core Server
Component/s: Shell, Tools
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Pawe? Smoli?ski Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-12983 Restore from 2.4 DB into 2.6 DB fails... Closed
Related
is related to SERVER-12834 Create flag to allow mongod to ignore... Closed
is related to SERVER-5290 fail to insert docs with fields too l... Closed
Operating System: ALL
Steps To Reproduce:

1. Backup data from working 2.4 instance
2. Try to restore it in version 2.6

Participants:

 Description   

When I'm trying to restore DB from backup, it throws error that index is too large. Version 2.4 is restoring such data without any problem and just warns that some data won't be indexed.

I'm getting following error message:
2014-03-01T10:47:54.232+0000 [tools] Btree::insert: key too large to index, failing **FILTERED*.contacts.$search_meta_1 1052 { : "*FILTERED**..." }
2014-03-01T10:47:54.483+0000 [tools] index build failed. spec: { v: 1, key:

{ search_meta: 1 }

, name: "search_meta_1", ns: "**FILTERED*.contacts" } error: 17282 Btree::insert: key too large to index, failing ***FILTERED*.contacts.$search_meta_1 1052 { : "*FILTERED**..." }
2014-03-01T10:47:55.056+0000 [tools] insert **FILTERED*.system.indexes keyUpdates:0 exception: Btree::insert: key too large to index, failing ***FILTERED*.contacts.$search_meta_1 1052 { : "*FILTERED**..." } code:17282 numYields:0 locks(micros) w:131243872 131243ms
Error creating index **FILTERED*.contacts: 17282 err: "*FILTERED**..."



 Comments   
Comment by Daniel Pasette (Inactive) [ 01/Mar/14 ]

Hi Pawel,
This is a result of the changes made in SERVER-5290.

See the documentation regarding this change here:
http://docs.mongodb.org/master//release-notes/2.6/#stricter-enforcement-of-index-key-length-limit

Starting in rc1, it will be possible to disable this check for the server and restore pre-2.6 behavior. See SERVER-12834.

Generated at Thu Feb 08 03:30:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.