點(diǎn)擊上方“IT那活兒”公眾號(hào),關(guān)注后了解更多內(nèi)容,不管IT什么活兒,干就完了?。。?/strong>
背景:
主庫(kù)dbpath目錄使用率96%,剩余空間只有40GB左右,且無(wú)法進(jìn)行磁盤(pán)擴(kuò)容。
PRIMARY:AKTM> db.list***ord.getIndexes();
[
{
"v" : 2,
"key" :{
"timestamp": 1
},
"name" :"timestamp_1",
"background": true,
"ns" :"AKTM.list***ord",
"expireAfterSeconds": NumberLong(2678400)
},
{
"v" : 2,
"key" :{
"_id": 1
},
"name" :"_id_",
"ns" :"AKTM.list***ord"
}
]
db.runCommand( { collMod:"list***ord",
index: { keyPattern: { timestamp:1 },
expireAfterSeconds: 604800
}
})
PRIMARY:AKTM> db.list***ord.getIndexes();
[
{
"v" : 2,
"key" :{
"timestamp": 1
},
"name" :"timestamp_1",
"background": true,
"ns" :"AKTM.list***ord",
"expireAfterSeconds": NumberLong(604800)
},
{
"v" : 2,
"key" :{
"_id": 1
},
"name" :"_id_",
"ns" :"AKTM.list***ord"
}
]
2020-07-01T07:17:49.265+0800 IREPL [replication-147] We are too stale to use10.***.***.83:27017 as a sync source. Blacklisting this sync sourcebecause our last fetched timestamp: Timestamp(1593529482, 5082) isbefore their earliest timestamp: Timestamp(1593553525, 1720) for 1minuntil: 2020-07-01T07:18:49.265+0800
2020-07-01T07:17:49.266+0800 IREPL [replication-147] sync source candidate: 10.**.***.138:27017
2020-07-01T07:17:49.268+0800 IREPL [replication-147] We are too stale to use10.25.151.138:27017 as a sync source. Blacklisting this sync sourcebecause our last fetched timestamp: Timestamp(1593529482, 5082) isbefore their earliest timestamp: Timestamp(1593553515, 601) for 1minuntil: 2020-07-01T07:18:49.268+0800
repl1:SECONDARY>rs.printReplicationInfo();
configured oplog size: 10240MB
log length start to end: 4704secs(1.31hrs)
oplog first event time: Wed Jul01 2020 06:30:31 GMT+0800 (CST)
oplog last event time: Wed Jul01 2020 07:48:55 GMT+0800 (CST)
now: Wed Jul01 2020 07:48:56 GMT+0800 (CST)
正確的操作方式應(yīng)該是:
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/129273.html
摘要:先睹為快振奮人心的時(shí)刻終于到來(lái)了,在經(jīng)過(guò)一個(gè)上市的日子后,終于發(fā)布了。實(shí)戰(zhàn)在線開(kāi)啟認(rèn)證模式解讀我是上海小胖,專(zhuān)注等開(kāi)源數(shù)據(jù)庫(kù)的,擁抱開(kāi)源,接受收費(fèi)。上海小胖原創(chuàng)地址歡迎各位大神前來(lái)評(píng)論。每周五,敬請(qǐng)期待,上海小胖獨(dú)更。 MongoDB 3.6 先睹為快 Part 1 振奮人心的時(shí)刻終于到來(lái)了,在經(jīng)過(guò)一個(gè)MongoDB 上市的日子后,MongoDB 終于發(fā)布了MongoDB 3.6 RC...
摘要:先睹為快振奮人心的時(shí)刻終于到來(lái)了,在經(jīng)過(guò)一個(gè)上市的日子后,終于發(fā)布了。實(shí)戰(zhàn)在線開(kāi)啟認(rèn)證模式解讀我是上海小胖,專(zhuān)注等開(kāi)源數(shù)據(jù)庫(kù)的,擁抱開(kāi)源,接受收費(fèi)。上海小胖原創(chuàng)地址歡迎各位大神前來(lái)評(píng)論。每周五,敬請(qǐng)期待,上海小胖獨(dú)更。 MongoDB 3.6 先睹為快 Part 1 振奮人心的時(shí)刻終于到來(lái)了,在經(jīng)過(guò)一個(gè)MongoDB 上市的日子后,MongoDB 終于發(fā)布了MongoDB 3.6 RC...
摘要:出現(xiàn)的問(wèn)題筆者前段時(shí)間開(kāi)發(fā)一個(gè)新項(xiàng)目的某個(gè)功能模塊要讀取老游戲中某個(gè)數(shù)據(jù)庫(kù)計(jì)作庫(kù)連續(xù)讀庫(kù)中的個(gè)集合相當(dāng)于的張表取數(shù)據(jù)在測(cè)試環(huán)境單次操作時(shí)是內(nèi)但是并發(fā)測(cè)試情況下比如內(nèi)個(gè)并發(fā)時(shí)讀取庫(kù)個(gè)集合的耗時(shí)能達(dá)到以上甚至且個(gè)并發(fā)請(qǐng)求幾乎同時(shí)完成但是在我本地 出現(xiàn)的問(wèn)題 筆者前段時(shí)間開(kāi)發(fā)一個(gè)新項(xiàng)目的某個(gè)功能模塊,要讀取老游戲中某個(gè)Mongo數(shù)據(jù)庫(kù)(計(jì)作A庫(kù)),連續(xù)讀A庫(kù)中的6個(gè)集合(相當(dāng)于MySQL的6...
摘要:大家好,我是冰河有句話叫做投資啥都不如投資自己的回報(bào)率高。馬上就十一國(guó)慶假期了,給小伙伴們分享下,從小白程序員到大廠高級(jí)技術(shù)專(zhuān)家我看過(guò)哪些技術(shù)類(lèi)書(shū)籍。 大家好,我是...
閱讀 1356·2023-01-11 13:20
閱讀 1707·2023-01-11 13:20
閱讀 1215·2023-01-11 13:20
閱讀 1906·2023-01-11 13:20
閱讀 4165·2023-01-11 13:20
閱讀 2757·2023-01-11 13:20
閱讀 1402·2023-01-11 13:20
閱讀 3671·2023-01-11 13:20