@@ -12,16 +12,27 @@ When decoding, failure to follow the contract can result in the misinterpretatio
12
12
13
13
SBE can generate runtime checks that ensure the correct usage of flyweight encoders/decoders/codecs (w.r.t. field access order) in Java, C++ and C#.
14
14
15
- To generate these runtime checks, pass ` -Dsbe.generate.sequencing .checks=true ` when running the SBE tool.
15
+ To generate these runtime checks, pass ` -Dsbe.generate.precedence .checks=true ` when running the SBE tool.
16
16
17
17
By default, the generated checks are disabled, using conditional compilation, as they have a significant performance overhead.
18
18
We expect that teams will enable these runtime checks in non-production environments and in their tests.
19
19
20
20
To enable the runtime checks:
21
21
22
- * In Java, set the ` sbe.enable.sequencing.checks ` system property to ` true ` .
23
- * In C++, define the ` SBE_ENABLE_SEQUENCING_CHECKS ` symbol when compiling.
24
- * In C#, define the ` SBE_ENABLE_SEQUENCING_CHECKS ` symbol when building.
22
+ * In Java, set the ` sbe.enable.precedence.checks ` system property to ` true ` .
23
+ * In C++, define the ` SBE_ENABLE_PRECEDENCE_CHECKS ` symbol when compiling.
24
+ * In C#, define the ` SBE_ENABLE_PRECEDENCE_CHECKS ` symbol when building.
25
+
26
+
27
+ #### Finer-grained enablement flags, e.g., per schema
28
+
29
+ The names of the symbols/macros/properties that enable checks may be adjusted by supplying the following system properties to ` SbeTool ` :
30
+
31
+ - ` sbe.precedence.checks.flagName ` controls the symbol/macro used to enable precedence checks at build time in the generated C#/C++ code.
32
+ It defaults to ` "SBE_ENABLE_PRECEDENCE_CHECKS" ` .
33
+
34
+ - ` sbe.precedence.checks.propName ` controls the property name used to enable precedence checks at runtime in the generated Java code.
35
+ It defaults to ` "sbe.enable.precedence.checks" ` .
25
36
26
37
### Checking complete encoding
27
38
0 commit comments