> Is it always ok to consider xdata to be valid, even if op_ret < 0? I would say yes, simply because it's useful. For example, xdata might contain extra information explaining the error, or suggesting a next step. In NSR, when a non-coordinator receives a request it returns EREMOTE. It would be handy for it to return something in xdata to identify which brick *is* the coordinator, so the client doesn't have to guess. It might also be useful to return a transaction ID, even on error, so that a subsequent retry can be detected as such. If xdata is discarded on error, then both the "regardless of error" and "only on error" use cases aren't satisfied. > If yes, I will have to update the syncop_*_cbk calls to ref xdata > if they exist, irrespective of op_ret. > > Also, it can be used in really cool ways, like we can have a > key called glusterfs.error_origin_xlator set to this->name of the xlator > where error originated and master xlators (fuse and gfapi) can log / make > use of it etc. Great minds think alike. ;) There might even be cases where it would be useful to capture tracebacks or statistics to send back with an error. _______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-devel