MCPcopy Create free account
hub / github.com/XTXMarkets/ternfs / proccessReleaseRequest

Method proccessReleaseRequest

cpp/core/LogsDB.cpp:1196–1213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1194 }
1195
1196 void proccessReleaseRequest(ReplicaId fromReplicaId, uint64_t requestId, const ReleaseReq& request) {
1197 if (unlikely(fromReplicaId != request.token.replica())) {
1198 LOG_ERROR(_env, "Token from replica id %s does not have matching replica id. Token: %s", fromReplicaId, request.token);
1199 return;
1200 }
1201 if (unlikely(request.token < _token)) {
1202 return;
1203 }
1204 if (unlikely(_token < request.token )) {
1205 writeBatch();
1206 _token = request.token;
1207 }
1208
1209 if (_lastReleased < request.lastReleased) {
1210 _lastReleased = request.lastReleased;
1211 }
1212
1213 }
1214
1215 void writeBatch() {
1216 if (_token == LeaderToken(0,0)) {

Callers 1

Calls 1

replicaMethod · 0.80

Tested by

no test coverage detected