dbpath = /home/john/tmp/mongodb/data
logpath = /home/john/tmp/mongodb/log/mongodb.log
repairpath = /home/john/tmp/mongodb/repair
pidfilepath = /home/john/tmp/mongodb/mongodb.pid
directoryperdb = true
logappend = true
noauth = true
port = 33306
maxConns = 1024
fork = true
rest = true
quota = true
quotaFiles = 1024
nssize = 16
That is my configure about mongo. I did not find "safe-mode" like
options for mongod command. could you please tell me something about
that?
my operation on the collection, where data lose occurred, is just as
follows:
p_conn->update(s_player_table, BSON("UID"<<user_id), player_data,
true) //An upsert operation
BSONObj gu_data = pConn->findOne(s_player_table,
BSON("UID"<<user_id<<"PUID"<<puid)); //An query operation
May be the operation will be some what frequently, But never circle
like;
will that cause some problems?
Regards!
On 5月21日, 下午6时44分, jm <
jtopp...@gmail.com> wrote:
> Just to make sure, are you sure the data "lost" ended up in mongo in
> the first place?
>
> If safe mode is not enabled or you dont use getLastError, it might
> appear as if inserts were successfull when they were not because some
> error. So the records would not be there when you later look for them.
>
> No idea what could cause successfully stored documents to disappear
> later. That's why I would suspect safe mode is off.
>
> On May 21, 10:16 am,JohnHenry<
qhlonl...@163.com> wrote:
>
>
>
> > Hi, all
> > We are using MongoDb
> > db version v2.0.2, pdfile version 4.5
> > It was set on single machine, using no "replica sets".
> > We use mongo as database of our system. But found that some times,
> > It will "drop some data" unexpectedly. We had make sure that there are
> > even no "remove" functions called in our code. (We are using C++
> > interface of mongo. DBClientConnection). but occasionally, some
> > records just missed.
> > Some other database, like mysql. If the data update function
> > failed, the old record will exist. But for mongo, (We are not sure
> > which operation cause this) the data just dropped. We can find nothing
> > usable on mongoDb log. So is anybody meet such case before?
> > Some body said the "kill -9" will cause data lost. But We never
> > use this command on mongod process. We some times use "kill -9" on our
> > bussiniess process which using mongoDB, But I don't think it will
> > cause mongo to lose data.
>
> > Best regards!- 隐藏被引用文字 -
>
> - 显示引用的文字 -