Skip to content

Commit

Permalink
Documentation overhaul
Browse files Browse the repository at this point in the history
Summary:
1. Clarify python patch support.
2. Move SafePatch motivation and implementation detail to contribution doc. Add explanation how to use SafePatch.
3. Remove out-dated  C++ Dynamic Patch.
4. Switching debugging from `prettyPrintPatch` to `debugPatch`.
5. Add operations sheet.
6. Clarify applying order for multiple operations.
7. Moving `customVisit` and `GeneratePatchNew` to the end since they are more situational.
8. Completely removed `DynamicPatch`. We will need to rewrite it with the new APIs.

The new version can be read here: https://www.internalfb.com/intern/staticdocs/eph/1732644360/thrift/docs/fb/features/patch/

Reviewed By: pranavtbhat

Differential Revision: D66207322

fbshipit-source-id: 3a4ac0e4e9d8852f0056c9c03a865c8e4d8ffe11
  • Loading branch information
TJ Yin authored and facebook-github-bot committed Nov 27, 2024
1 parent ba41f38 commit 1b06194
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions thrift/doc/contributions/patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,12 @@ Note that this API needs to work with dynamic patch, thus both input and output
```
O(size of patch1 + size of patch2)
```

## SafePatch

When Thrift Patch is serialized (i.e. sent over the wire or stored), Thrift SafePatch must be used. It provides safe means to transport Thrift Patch over the wire and guarantees that, for any combination of producer and consumer, any serialized instance will either be correctly applied or will fail clearly and deterministically. Thrift SafePatch provides backward compatiblity as well as protection from invalid forward consumption. Thrift SafePatch encodes the minimum Thrift SafePatch version that is required to safely and successfully process the patch. For example, Thrift AnyPatch is available from V2. Even if AnyPatch is available for the binary, if only V1 operations (i.e. `assign`), Thrift SafePatch will encode V1 instead of V2.

## Thrift Patch Changelog
### V2
#### Added
* Support for AnyPatch

0 comments on commit 1b06194

Please sign in to comment.