HarperFast / HarperFast/harper
Add last accessed time metadata
- Dominant language
- JavaScript
- Stars
- 89
- Forks
- 10
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 205
Description
We would like to add an option to record the last accessed time as metadata on record entries. This should probably be recorded as a new metadata field since we don't want to actually modify the record itself, since that would count as a record modification (changing the version, updated timestamp). This needs to be with careful consideration of costs, writes tend to be expensive, and "recording" a change to the last access time is, by definition, a write operation. However, there are some things we can do to mitigate cost:
* This should only be enabled explicitly
* This should be enabled with a "debouncing" setting; a limit to how recent of a last accessed time should trigger an update to the last accessed time. A series of repeated accesses should trigger a larger number of access time rewrites
* We may want to avoid writing this in the transaction log. Does this need to be replicated? Presumably having the last access time (separately) for each node may be advantageous (and not replicating).
* Eventually we could/should utilize RocksDB's merge operation to specifically update the metadata and leave the rest of the record alone.
Contributor guide
Research direction
Start by locating record-entry metadata handling and the transaction-log paths, then review how RocksDB merge operations are exposed. Define the opt-in behavior, debounce semantics, and whether access metadata is replicated before implementation; done means those decisions are documented and covered by tests for repeated accesses and record-version preservation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100