Skip to content

Conversation

@trueleo
Copy link
Contributor

@trueleo trueleo commented Sep 9, 2022

Description

Currently any event that arrives is directly written to data.parquet. It is easier to do it this way but this ultimatly slows down log ingestion. To make log ingestion faster a stream of record-batches would act as an ideal buffer. Appending arrow record-batches directly to a stream is faster way to go about it but it has it's own challenges.

  • querying realtime would require having these record-batches in memory.
  • directly appending record-batches from multiple threads to an append only file is not supported by Arrow StreamWriter. Locking used for now
  • Re-implementation of stats is required
  • Cannot fully guarantee state of local-storage if it failed exactly at move step of local-sync. orphan tmp files can occur although that'd very rare

also fixes #92


This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Currently any event that arrives is directly written to data.parquet. It is
easier to do it this way but this ultimatly slows down log ingestion.
To make log ingestion faster a stream of record-batches would act
as an ideal buffer. Appending arrow record-batches directly to a stream is
faster way to go about it but it has it's own challenges.

- querying realtime would require having these record-batches in memory.
- directly appending record-batches from multiple threads to an append only file
is not supported by Arrow StreamWriter. Locking is used for now
- Re-implementation of stats is required
- Cannot fully guarantee state of localstorage if it failed exactly
at move step of localsync. orphan tmp files can occur although that'd very rare
@trueleo trueleo marked this pull request as ready for review September 9, 2022 12:04
@nitisht nitisht merged commit 31273c2 into parseablehq:main Sep 9, 2022
@trueleo trueleo deleted the stream_writers branch September 9, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup default number of workers for actix server.

2 participants