-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable length struct support in FASTER C# #120
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…l.values for threads that haven't initialized values yet
commit 2ba964526c96c5c6852d1b702348a5bc9fa94dcb Merge: f2b2c1f 765c083 Author: Badrish Chandramouli <badrishc@microsoft.com> Date: Thu Apr 4 10:54:51 2019 -0700 Merge branch 'nostatics' of https://github.com/Microsoft/FASTER into readobjfix commit f2b2c1f84b0bac97da222de4f3c929743742ecf2 Author: Badrish Chandramouli <badrishc@microsoft.com> Date: Thu Apr 4 10:54:09 2019 -0700 Fixes to addresses, cleanup object read logic commit 765c083 Author: Peter Freiling <peterfr@microsoft.com> Date: Thu Apr 4 10:01:26 2019 -0700 Fixing issue where LightEpoch.IsProtected dereferences FastThreadLocal.values for threads that haven't initialized values yet commit b78aee3 Author: Peter Freiling <peterfr@microsoft.com> Date: Wed Apr 3 20:43:28 2019 -0700 Removing extra buffer copy commit cd0da5ec37469486e0b6cd978c2088a5ee6bb598 Author: Badrish Chandramouli <badrishc@microsoft.com> Date: Wed Apr 3 19:59:53 2019 -0700 Updates commit 8d2ceeb6afcdaf2dacb98c0fa905a66bba7f3ae9 Author: Badrish Chandramouli <badrishc@microsoft.com> Date: Wed Apr 3 19:22:39 2019 -0700 Fix for reading objects
…nd records may both be inline variable sized.
…nto varlenstructs
@badrishc: I hope you found the impact report helpful! I came across FASTER and requested the report just out of curiosity, but if you're interested we can set up @softagram-bot to analyze all of your open source pull requests for free. On your end it would just require setting up a webhook, and we'll take care of the rest. Let me know 🙂 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The title appears contradictory, but bear with us for a minute.
We are (re-)introducing an unsafe advanced use case for FASTER, where there is a need to
store and index variable length keys and/or values in the hybrid log, without using classes
or a separate object log.
The basic idea is to use
ref struct
as a proxy for pointers to variable-sized memory inC#. These objects are placed contiguously in-place in the single hybrid log, leading to
efficient packing while avoiding the additional I/O (on reads and writes) that a separate
object log entails. Users have to be careful that updates do not attempt to increase the
size of the object, if the object is already present in the mutable region.
Users provide information on the actual length of the data underlying the types, by
providing implementations for an
IVariableLengthStruct<T>
interface. Serializers are notrequired, as these are effectively value-types.
This interface to FASTER is unsafe -- one may orthogonally create safe APIs on top of this
raw functionality using, for example,
Span<T>
andMemory<T>
.See an example of how this functionality is used here: https://github.com/Microsoft/FASTER/tree/master/cs/playground/VarLenStructSample