It has been seen in some customer issues that EINVAL status code was returned by ep-engine on certain requests. It would be very helpful for such offending requests to be logged, so that we know where to look for problems. It would also make it easier to provide workarounds to customers by removing the offending requests.
According to comments in
MB-18953, the logging should be done by client, e.g., XDCR, rather than ep-engine. Even though the EINVAL response does not contain vb or key info, it does contain an opaque which can be used by XDCR to look up the corresponding MCRequest and then to log it.
The same needs to done for other fatal responses from memcached.