Skip to content
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

[C#] FASTER v2 release #563

Merged
merged 147 commits into from
Apr 13, 2022
Merged

[C#] FASTER v2 release #563

merged 147 commits into from
Apr 13, 2022

Conversation

badrishc
Copy link
Contributor

@badrishc badrishc commented Oct 3, 2021

FASTER C# will soon be releasing a v2, that will introduce a number of improvements and features. Applications will have some breaking changes, but should not be too much if you are not using IFunctions directly (we recommend using base classes for functions, see samples for details).

List of major changes

Changes to IFunctions

  • SingleWriter provides reason for writing to tail. Added PostSingleWriter for work done after copy to tail, during various operations: [C#] Add WriteReason parameter to SingleWriter #630
  • Record expiration support (*Reader returns bool)
  • Remove IAdvancedFunctions -- merge capability into IFunctions
  • Remove lock APIs from IFunctions, record-level locking is now a core FASTER functionality. It can still be disabled at store level.

Advanced operations

Recovery

Log compaction

  • Support scan and lookup based log compaction techniques
  • Compaction always updates the BeginAddress variable in memory
  • New ShiftBeginAddress behavior: only shifts the (logical) BeginAddress variable in memory, and does not actually truncate physical log on disk, unless an option is specified (destructive operation)
  • Added store.Log.Truncate API for physical log truncation until current BeginAddress (destructive operation).
  • Truncate log automatically until the persisted BeginAddress after taking a checkpoint. This is the only safe way to truncate the log on disk without data loss.
  • See details at [C#] Log compaction v2 #598

FasterLog v2

Other changes

Features planned for v2.1

Secondary Indexing (SI) Framework for FASTER

  • Allows registration of custom secondary indexes (consistent) to core engine

Hash Value Index as example SI

  • Allows secondary hash indexing by key/value attributes (e.g., { age > 30 })

TedHartMS and others added 2 commits October 3, 2021 12:21
* various changes from indexing work
- Add BeginAddress and EndAddress to scan iterators
- Allow null deltaFileDevice in HybridLogCheckpointInfo.Recover
- Rename FoldOverSnapshot to useFoldOverCheckpoint
- Make TakeHybridLogCheckpoint overload call through to overload to avoid duplication
- Add default values to new scanDelta and recoverTo arguments
- Add missing checkpointManager.OnRecovery call to IntenralRecoverAsync
- Fix some comments

* Fix shortened name in test to work on Linux
* Add support for record-expiration management to RMW and I(Advanced)Functions

* Update Remote to RMW changes for expiration support

* Update SpanByteFunctionsForServer.cs

* Update SpanByteFunctionsForServer.cs

* Update ServerKVFunctions.cs

* Added SpanByteAdvancedFunctions

* moving remote to IAdvFun

* LogDir semantics - minor update

Co-authored-by: Badrish Chandramouli <badrishc@microsoft.com>
@badrishc badrishc added work in progress Work in progress announcement Announcement labels Oct 3, 2021
badrishc and others added 24 commits October 3, 2021 16:59
* Add support for record-expiration management to RMW and I(Advanced)Functions

* Update Remote to RMW changes for expiration support

* Update SpanByteFunctionsForServer.cs

* Update SpanByteFunctionsForServer.cs

* Update ServerKVFunctions.cs

* Added SpanByteAdvancedFunctions

* moving remote to IAdvFun

* LogDir semantics - minor update

* Added PCU

* fixed pcu logic

* Fixing testcase so that RMW does not expect old address.

* Fix PCU bugs

* Extend PostCopyUpdate to IFunctions; fix a few comments in remote

Co-authored-by: TedHartMS <15467143+TedHartMS@users.noreply.github.com>
* Merge IAdvancedFunctions into IFunctions

* Add SupportsPostOperations and Post(IU|CU|SD); expand "ref RecordInfo recordInfo, long address" on Functions

* Add RecordMetadata to RMWCompletionCallback params; improve ReadAddressTests

* Add tests of Upsert with Input
* RecordInfo v2

* fix version jump in CPR.

* Updated misc stuff

* nit

* misc updates to SpanByte

* Remove IntExclLocker

* Add Try APIs to record locking

* cleanup
* Add overloads of Upsert that take "ref Output" and one that takes "out RecordMetadata"; Fix RMW setting pendingContext.RecordInfo/LA; add locking of PostCopyUpdater, PostInitalUpdater, PostSingleWriter;

* nits

* Reorganize ClientSession IntenralFasterSession to group functions for a given area (Read, Upsert, RMW, etc.) together

* Fix locking on Post* calls

* Fixes for Post* locking

* remove net461 and netcoreapp2.1; add net6.0 in <Choose> to work on later in VS2022

* Update to new RecordInfo locking calls

* Update to new IFunctions Locking signatures and RecordInfo implementation

* Add post operations to Faster.benchmark
* Removed WAIT_PENDING

* * Use only 1 bit for newVersion in RecordInfo, for CPR. Semantics are that sessions in v+1 will create records in fuzzy region with this bit set. Recovery only scans fuzzy region to elide such records.
* Add 1 Filler bit for future use with fillers in records
* Increase read lock bits to 6 (64 parallel readers)
* Use dirty bit for incremental checkpoints

* fix ycsb to not delete data file if we are using --recover

* nits

* Fix epoch re-entry violation

* Move to long versions, for KV checkpoints.

* Shuffle around stuff for better cache alignment in benchmark.

* Updates based on review
* Checkpoint work

* Add notion of manual commit

* fix

* Recovery of commit cookie

* alternative design of log-cookie

* Implementation improvement

* code review comments

* Cleanup + testing

* Add management utility for LogCommitManager

* Handle race on manual commit code path where not the latest tail is written out

* Rough sketch of new commit code path

* save work

* Prototype now works

* fix to truncate log

* Add condition to only scan log in fastCommitMode

* Rough draft to allow for 1. elided commit record when fastCommit turned off and 2. "loose" commits

* checkpoint changes

* fix bug with readonly log allocator initialization

* disable fast commit temporarily for CI

* fix MLSD and mem device fast commit behavior

* fix AzureStorageDevice exception type and remove self-termination on failure

* test case on concurrent inserts

* nits and test fixes

* Re-enable epoch protection on CommitInternal

* Try to identify issue on CI

* fix Linux bug?

* Remove debugging

* Ensure that full flush list error callbacks do not break FlushedUntilAddress tracking

* Fix unclean shutdown of stress test

* update device log test to scan until tail instead

* change error code used for full flush list to better distinguish from others

* nits

* Minor updates.

Co-authored-by: Badrish Chandramouli <badrishc@microsoft.com>
* Checkin misc changes, removed overWrite commits

* simplify OnRecovery logic
badrishc and others added 28 commits March 14, 2022 11:38
…ful probe per thread. Adjust table size based on number of machine processors.
* Use GC.AllocateArray where possible
* update benchmark as well.
…onditionals from all .csprojs now that we've moved to VS 2022 (#687)

- add Status.Expired
- update FASTER.client's copies of Status(Code).cs
- Replace a TODO with an explanatory comment
* Add hook for failed CAS during SingleWriter. Still need to support other failed CAS scenarios.

* Fix remote sln

* Implement Dispose() functions - (MemoryLogCompactionTests fails at this time)

* Fix MemoryLogCompactionTests; move DisposeDeserializedFromDisk up to ICPRFC

* fix remote build

Co-authored-by: TedHartMS <15467143+TedHartMS@users.noreply.github.com>
@badrishc badrishc changed the title [C#] [WIP] Work towards FASTER v2 preview release [C#] FASTER v2 release Apr 13, 2022
@badrishc badrishc merged commit 50a19c0 into main Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
announcement Announcement work in progress Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants