ECKIT-635 FAM Mock and data structures on FAM via OpenFAM lib#209
ECKIT-635 FAM Mock and data structures on FAM via OpenFAM lib#209mcakircali wants to merge 243 commits intodevelopfrom
Conversation
new option OPENFAM (requires OpenFAM and gRPC packages) FAM source files
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 57 out of 58 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ca84fec to
682537f
Compare
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
ECKIT-635
| void reset(); | ||
|
|
||
| /// Same as reset() but must be called while the mutex is held (e.g., during initialization). | ||
| void resetUnlocked(); |
There was a problem hiding this comment.
Is this something we want to have as a public method?
| new_object.put(length, offsetof(FamListNode, length)); | ||
| new_object.put(data, sizeof(FamListNode), length); | ||
|
|
||
| // 2. Link into list: use CAS-loop to atomically update head.next |
There was a problem hiding this comment.
Be explicit. CAS === Compare-And-Swap.
| /// | ||
| /// Supports multiple readers and writers operating concurrently without locks. | ||
| /// Implements wait-free insertion and logical deletion, with version-based ABA detection. | ||
| class FamList { |
There was a problem hiding this comment.
This class really is great.
|
|
||
| /// Check if key already exists | ||
| /// @note: This check-then-insert sequence is not atomic. | ||
| /// concurrent inserts of the same key may both insert resulting duplicates. |
There was a problem hiding this comment.
Please come and discuss. I want to understand what needs to be done to make this 'right'.
Can we write a test case that fails due to the non-atomicity.
|
|
||
| /// Encode a key-value pair into a flat buffer for storage in FamList nodes. | ||
| /// Layout: [key (KeySize bytes)] [value data (length bytes)] | ||
| static Buffer encode(const key_type& key, const void* data, size_type length) { |
There was a problem hiding this comment.
Do we need to construct a contiguous buffer, and write that to FAM. IS that more efficient than writing the data to FAM directly in two chunks, only doing the assembly in-situ?
| } | ||
| ++bucket_; | ||
| } | ||
| // we reached the end |
There was a problem hiding this comment.
some of these comments are pretty uninformative.
1e99444 to
ece1ff7
Compare
Description
Adds a FAM-backed unordered map (plus supporting list/session/URI infrastructure) and an OpenFAM mock implementation to enable development/testing without a real OpenFAM deployment.
Introduces:
Contributor Declaration
By opening this pull request, I affirm the following:
🌦️ >> Documentation << 🌦️
https://sites.ecmwf.int/docs/dev-section/eckit/pull-requests/PR-209