Skip to content

Create all temporary directories on startup #153

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

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

trueleo
Copy link
Contributor

@trueleo trueleo commented Oct 6, 2022

Fixes #74.

Description

Create all the temporary directories on program startup. Right now event writer simply creates the record file without checking or creating the directories. This responsibility should be delegated to startup sync where it creates all the directories beforehand based on metadata available.

Startup sync now explicitly panics if create temporary directory fails ( permission issues ) or moving some old record file fails. This is because these operations are essential for running the server and it saves users from the confusion of why they cannot post any event.


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.

Copy link
Member

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nitisht nitisht merged commit 768fcb4 into parseablehq:main Oct 6, 2022
@trueleo trueleo deleted the startup branch October 6, 2022 13:56
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.

Fails to process event if data directory has been deleted
2 participants