FluidFramework: DataProcessingError issues
-
Looking at DataProcessingError.wrapIfUnrecognized() implementation, I do not understand why we are not using fluidErrorCode and instead coming up with a new concept - dataProcessingCodepath?
const dpe = new DataProcessingError(errMsg, "" /* fluidErrorCode */); error.addTelemetryProperties({ dataProcessingError: 1, dataProcessingCodepath, }); -
The following code seems wrong. I feel DataProcessingError’s constructor should be protected, and this code likely wants DataCorruptionError instead. It would be also great to have good comments above these classes to clearly articular the expected difference in usage.
const error = new DataProcessingError( "unexpectedAckReceived", "unexpectedAckReceived", { -
My main concern though is usage of errorType = ContainerErrorType.dataProcessingError. Given that some data processing error will get it, and some will not (because they already have some other type), presence of this errorType is not something I’d want to rely on. I think dataProcessingError: 1 is the right model here and the right way to find and differentiate these errors.
-
I think we should have some kind of “undefined” or “none” errorType that can be overwritten by any layer (same way as we “overwrite” it if the error does not conform to IFluidErrorBase), but at the same time workflow allows us to convert error to IFluidErrorBase and add properties to it that will be preserved through any future conversions. I have a feeling that some of the other wrap / wrapErrorAndLog / wrapError flows might have similar concern.
Mark’s responses/proposal
- We are retiring
fluidErrorCode, see #8929. ThisdataProcessingCodepathwill probably not be interesting to primary consumer of these errors, which will be partners who see the container close like this, but might be interesting to us, so stashing in a new prop. - Agree on both points - hiding the constructor, and adding comments everywhere
- See this comment and surrounding conversation. I agree with how it is now, and will try to clarify in the code / comments why it is this way
- This is a good point. Today if someone called
normalizeErroron the way up to a call toCreateProcessingError, it would be thwarted and would not classify it properly (it would remaingenericErrorrather thandataProcessingError. Opened a separate issue: #9027
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- DataProcessingError issues Issue #8262 — committed to vladsud/FluidFramework by vladsud 3 years ago
- DataProcessingError improvements (#9157) fixes #8262 fixes #9027 There's been a lot of debate (and confusion) around DataProcessingError. See discussion in issue #8262 and PR #8475. In the e... — committed to microsoft/FluidFramework by markfields 2 years ago
Looking at our data again, now that the instrumentation bug is fixed, it’s back to what Tony showed above - only errorTypes
DataCorruptionErrorandDataProcessingError. With that in mind, I’m going to do a quick PR to updateCreateProcessingErrorfunction to always wrap, getting rid of the special case whenerrorTypeis already set.So here is what I see - these 2 queries capture more of the essence of what happens (even though they capture same instance of error multiple times as it gets recorded by multiple events). Not all errors show up as error events, but it does not make a difference in how we should format these errors (as they do show up programmatically, as well as in telemetry). Plus some were incorrectly not marked as errors in prior builds. Example