[SERVER-6564] mongodump query had different behavior if quotes are included Created: 23/Jul/12  Updated: 11/Jul/16  Resolved: 11/Feb/13

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 2.2.0-rc0
Fix Version/s: 2.3.2

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-5677 rewrite json parser Closed
Related
is related to SERVER-6691 mongodumping oplog with timestamp query Closed
Operating System: ALL
Participants:

 Description   

./mongodump -d local -c oplog.rs -q "{ts : { \"\$gte\" : { \$timestamp : { t : 1342670400000, i : 0 } } }}"
connected to: 127.0.0.1
Mon Jul 23 13:45:24 DATABASE: local      to     dump/local
Mon Jul 23 13:45:24     local.oplog.rs to dump/local/oplog.rs.bson
QUERY: { ts: { $gte: { $timestamp: { t: 1342670400000, i: 0 } } } }
Mon Jul 23 13:45:30              0 objects
Mon Jul 23 13:45:30     Metadata for local.oplog.rs to dump/local/oplog.rs.metadata.json

vs:

 ./mongodump -d local -c oplog.rs -q "{ts : { \"\$gte\" : { \"\$timestamp\" : { \"t\" : 1342670400000, \"i\" : 0 } } }}"
connected to: 127.0.0.1
Mon Jul 23 13:45:55 DATABASE: local      to     dump/local
Mon Jul 23 13:45:55     local.oplog.rs to dump/local/oplog.rs.bson
QUERY: { ts: { $gte: Timestamp 1342670400000|0 } }
Mon Jul 23 13:46:01             100/13786540    0%      (objects)
Mon Jul 23 13:46:01              10038 objects
Mon Jul 23 13:46:01     Metadata for local.oplog.rs to dump/local/oplog.rs.metadata.json

Note, the line that starts with "QUERY" above was something I added to print the parsed query object taken from the json input. Notice that in the second output it prints an actual timestamp object, while in the first it's just a document with the field name of "$timestamp"


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