[SERVER-25891] repairDatabase command should error if featureCompatibilityVersion is 3.2 and database contains NumberDecimal values Created: 31/Aug/16  Updated: 06/Dec/22  Resolved: 09/Sep/16

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Backlog - Query Team (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query
Participants:

 Comments   
Comment by Tess Avitabile (Inactive) [ 02/Sep/16 ]

After looking at repair_database.cpp, I'm not sure we should do this work. For one, we don't necessarily go through every record, since we skip collections with no indexes. For two, we validate each document as we are rebuilding the indexes for a collection, and I'm not sure it's desirable for repairDatabase to fail in the middle of rebuilding the indexes to report decimal data. Currently, we only fail in the middle of rebuilding the indexes if we encounter a duplicate _id error--otherwise all documents with invalid BSON are just deleted. I would propose just logging that we found decimal data (or making no changes). Users can still use collection validation to check for decimal data.

Comment by Tess Avitabile (Inactive) [ 31/Aug/16 ]

dan@10gen.com and the query team were discussing how you might check whether it's safe to downgrade to 3.2. 3.2 won't start up if you have V2 indexes or system.views, but it will start up if you have decimal data. We thought that collection validation and repairDatabase could tell you that you have decimal data if featureCompatibilityVersion is 3.2. (See also SERVER-25889).

Comment by Andy Schwerin [ 31/Aug/16 ]

Wait, I don't see why this aligns with the concept of feature compatibility?

Comment by Tess Avitabile (Inactive) [ 31/Aug/16 ]

Or indexes or collections with collation? Or v=2 indexes? I'm not sure.

Comment by Kyle Suarez [ 31/Aug/16 ]

Should it also fail if that database has a system.views collection?

Generated at Thu Feb 08 04:10:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.