public void AppendFile() { Placement place = new Placement(798, 1, 1, 1, UInt16.MaxValue); using (ServerClientSession session = new ServerClientSession(systemDir)) { session.BeginUpdate(); ObjWithArray a = new ObjWithArray(10); a.Persist(place, session); session.Commit(); // commit Database 798 } place = new Placement(798, 2, 1, 100, UInt16.MaxValue); for (int i = 0; i < 25; i++) { using (ServerClientSession session = new ServerClientSession(systemDir)) { //session.SetTraceAllDbActivity(); session.BeginUpdate(); for (int j = 0; j < 1000; j++) { ObjWithArray a = new ObjWithArray(j * 10); a.Persist(place, session); } session.FlushUpdates(); session.FlushUpdatesServers(); // check if this will cause file to be appended Database db = session.NewDatabase(3567); using (ServerClientSession session2 = new ServerClientSession(systemDir)) { session2.BeginUpdate(); ObjWithArray a = new ObjWithArray(10); a.Persist(place, session2); session2.Commit(); } session.Abort(); // appended page space now unused? Need tidy? } } }
public void AppendFile() { Placement place = new Placement(798, 1, 1, 1, UInt16.MaxValue); using (ServerClientSession session = new ServerClientSession(systemDir)) { session.BeginUpdate(); ObjWithArray a = new ObjWithArray(10); a.Persist(place, session); session.Commit(); // commit Database 798 } place = new Placement(798, 2, 1, 100, UInt16.MaxValue); for (int i = 0; i < 25; i++) { using (ServerClientSession session = new ServerClientSession(systemDir)) { //session.SetTraceAllDbActivity(); session.BeginUpdate(); for (int j = 0; j < 1000; j++) { ObjWithArray a = new ObjWithArray(j * 10); a.Persist(place, session); } session.FlushUpdates(); session.FlushUpdatesServers(); // check if this will cause file to be appended Database db = session.NewDatabase(3567); using (ServerClientSession session2 = new ServerClientSession(systemDir)) { session2.BeginUpdate(); ObjWithArray a = new ObjWithArray(10); a.Persist(place, session2); session2.Commit(); } session.Abort(); // appended page space now unused? Need tidy? } } }