Insert data into mongodb, but most data cannot be inserted

  mongodb, question

Three ports are opened on a computer in Replica Set mode. a new DB and a new collection have just been built. more than 3,000 pieces of data can be inserted into this collection. for the first time, only 1,600 pieces can be inserted, and the library can be deleted. then, for the second time, more than 1,700 pieces and for the third time, more than 1,800 pieces can be inserted. The computer is a 32-bit old machine, and the size of these 3000 pieces of data is 125Kb. Apis that use java.

Mongo mongo = null;
MongoURI uri=new MongoURI("mongodb://localhost:27017,localhost:27018,localhost:27019");
mongo=new Mongo.Holder().connect(uri);
DB db=mongo.getDB("words");
DBCollection co= db.getCollection("test");
String pa="c:\\111.txt";
FileReader fr;
fr = new FileReader(pa);
BufferedReader in=new BufferedReader(fr); 
String line=null;
    BasicDBObject document = new BasicDBObject();
    String datas[]=line.split("-");
    int id=Integer.parseInt(datas[0]);
    System.out.println(id+"    "+datas[1]);

Mongo is not safe to write to. To ensure no problem, getLastError is the best.