GetOngoingTasks returns the list of ongoing tasks.
()
| 236 | |
| 237 | // GetOngoingTasks returns the list of ongoing tasks. |
| 238 | func GetOngoingTasks() []string { |
| 239 | n := groups().Node |
| 240 | if n == nil { |
| 241 | return []string{} |
| 242 | } |
| 243 | |
| 244 | n.opsLock.Lock() |
| 245 | defer n.opsLock.Unlock() |
| 246 | var tasks []string |
| 247 | for id := range n.ops { |
| 248 | tasks = append(tasks, id.String()) |
| 249 | } |
| 250 | return tasks |
| 251 | } |
| 252 | |
| 253 | // Now that we apply txn updates via Raft, waiting based on Txn timestamps is |
| 254 | // sufficient. We don't need to wait for proposals to be applied. |