MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / expire

Method expire

sqlchain/ackindex.go:113–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111}
112
113func (i *multiAckIndex) expire() {
114 i.RLock()
115 defer i.RUnlock()
116 // TODO(leventeliu): need further processing.
117 for _, v := range i.respIndex {
118 log.WithFields(log.Fields{
119 "request_hash": v.GetRequestHash(),
120 "request_time": v.GetRequestTimestamp(),
121 "request_type": v.Request.QueryType,
122 "request_node": v.Request.NodeID,
123 "response_hash": v.Hash(),
124 "response_node": v.NodeID,
125 "response_time": v.Timestamp,
126 }).Warn("query expires without acknowledgement")
127 }
128 for _, v := range i.ackIndex {
129 log.WithFields(log.Fields{
130 "request_hash": v.GetRequestHash(),
131 "request_time": v.GetRequestTimestamp(),
132 "request_type": v.Response.Request.QueryType,
133 "request_node": v.Response.Request.NodeID,
134 "response_hash": v.GetResponseHash(),
135 "response_node": v.Response.NodeID,
136 "response_time": v.GetResponseTimestamp(),
137 "ack_hash": v.Hash(),
138 "ack_node": v.NodeID,
139 "ack_time": v.Timestamp,
140 }).Warn("query expires without block producing")
141 }
142}
143
144type ackIndex struct {
145 hi map[int32]*multiAckIndex

Callers 1

advanceMethod · 0.80

Calls 7

WithFieldsFunction · 0.92
WarnMethod · 0.80
GetResponseHashMethod · 0.80
GetResponseTimestampMethod · 0.80
HashMethod · 0.65
GetRequestHashMethod · 0.45
GetRequestTimestampMethod · 0.45

Tested by

no test coverage detected