/** * Walk through the target peer commmittedLog. * @param sessionId * @param peerId */ private void validateRequestLog(long sessionId, int peerId) { String session = Long.toHexString(sessionId); LOG.info("Searching for txn of session 0x " + session + " on peer " + peerId); String peerType = peerId == qb.getLeaderIndex() ? "leader" : "follower"; QuorumPeer peer = qb.getPeerList().get(peerId); ZKDatabase db = peer.getActiveServer().getZKDatabase(); for (Proposal p : db.getCommittedLog()) { Assert.assertFalse("Should not see " + TraceFormatter.op2String(p.request.type) + " request from local session 0x" + session + " on the " + peerType, p.request.sessionId == sessionId); } }