| 80 | |
| 81 | template <typename RequestWrapper> |
| 82 | Status RecentRequestIds::TrackUnique(int64 request_id, |
| 83 | const string& method_name, |
| 84 | const RequestWrapper* wrapper) { |
| 85 | if (Insert(request_id)) { |
| 86 | return Status::OK(); |
| 87 | } else { |
| 88 | return errors::Aborted("The same ", method_name, |
| 89 | " request was received twice. ", |
| 90 | wrapper->ToProto().ShortDebugString()); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | } // namespace tensorflow |
| 95 |