Skip to content

Conversation

@DeltaDizzy
Copy link
Contributor

@DeltaDizzy DeltaDizzy commented Nov 14, 2025

The C++ DataLogReader classes allow the user to get the name, type, metadata, etc. of any entry in a log given only its entry id using an internal map. The java library does not expose this functionality, so this is a proof of concept at one way this could be added. There are some very obvious warts but I want to get feedback if I am even barking up the right tree to begin with.

Closes #8126

TODO:

  • Implement DataLogReaderRange usages
  • Javadoc

@github-actions github-actions bot added the 2027 2027 target label Nov 14, 2025
@DeltaDizzy DeltaDizzy force-pushed the java-datalog-entry-map branch from b297fca to 4f478ff Compare November 19, 2025 18:23
@DeltaDizzy DeltaDizzy marked this pull request as ready for review November 19, 2025 18:50
@DeltaDizzy DeltaDizzy requested a review from a team as a code owner November 19, 2025 18:50
@DeltaDizzy DeltaDizzy force-pushed the java-datalog-entry-map branch from 4f478ff to fc0fb6e Compare November 19, 2025 19:02
@PeterJohnson
Copy link
Member

PeterJohnson commented Nov 20, 2025

The C++ DataLogReader class does not have these functions, only DataLogReaderThread does.

DataLogReaderThread reads the entire file (in the background) in order to build the map, and the user can separately check (or have a signal callback) to find out when reading is complete. The current approach in this PR has a major flaw in that it doesn't read the entire file for the user. A user would need to iterate over the entire file first (to build the map) before the added functions would work. This ordering dependency is not obvious in the API.

Also, in Java, you might not want to construct entries for the entire file, so this background scan should probably not do that, and manually decode only the start and finish records?

@DeltaDizzy DeltaDizzy force-pushed the java-datalog-entry-map branch from 94aeaeb to 192a0f7 Compare November 23, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2027 2027 target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants