Skip to content

Commit 3673788

Browse files
committed
Update docs to reflect changes in precedence checking flags.
1 parent c51d4ee commit 3673788

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

Safe-Flyweight-Usage.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,27 @@ When decoding, failure to follow the contract can result in the misinterpretatio
1212

1313
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#.
1414

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.
1616

1717
By default, the generated checks are disabled, using conditional compilation, as they have a significant performance overhead.
1818
We expect that teams will enable these runtime checks in non-production environments and in their tests.
1919

2020
To enable the runtime checks:
2121

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"`.
2536

2637
### Checking complete encoding
2738

0 commit comments

Comments
 (0)