[SERVER-12840] oplogSize negative value Created: 21/Feb/14  Updated: 22/Feb/14  Resolved: 22/Feb/14

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: David Docteur [X] Assignee: Unassigned
Resolution: Done Votes: 0
Labels: --oplogsize
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File issue-oplogsize.png    
Operating System: ALL
Steps To Reproduce:

sudo mongod --oplogSize -1000000 will simply return Assertion failure c src/mongo/db/client.h 235 (see screenshot attached)

Participants:

 Description   

This issue allows a negative value to be given to the --oplogSize option
while initializing the mongod.

sudo mongod --oplogSize -1000000



 Comments   
Comment by David Docteur [X] [ 22/Feb/14 ]

okay, thanks Asya for your feedback.

Comment by Asya Kamsky [ 22/Feb/14 ]

Correct thing happens for invalid argument to oplogSize.

The error message is a duplicate of https://jira.mongodb.org/browse/SERVER-8011 fixed in 2.5.3

Comment by Asya Kamsky [ 22/Feb/14 ]

Just checked it (mac, 2.6.0-rc0) same thing:

$ mongod --oplogSize -1000
BadValue bad --oplogSize arg
try 'mongod --help' for more information

It does not accept a negative value, so I think that's the correct error message.

If you look closer at your screenshot, that's the exact same output you are getting - it appears there is an assertion during shutdown though.

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