Skip to content
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

MAINT: use tmp folder for default db path for service-map #5037

Conversation

chenqi0805
Copy link
Collaborator

Description

Change default DB path for service map to be under /tmp since it is only used for off-heap memory

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: George Chen <qchea@amazon.com>
@@ -16,7 +16,7 @@
public class ServiceMapProcessorConfig {
private static final String WINDOW_DURATION = "window_duration";
static final int DEFAULT_WINDOW_DURATION = 180;
static final String DEFAULT_DB_PATH = "data/service-map/";
static final String DEFAULT_DB_PATH = "/tmp/data/service-map/";
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is the right solution. In fact, we've had issues in the past where Data Prepper is trying to write to directories it does not have access to such as /tmp.

Maybe, make this configurable instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for suggestion! made the change

Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
Copy link
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

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

Thank you!

@chenqi0805 chenqi0805 merged commit 6e51f51 into opensearch-project:main Oct 9, 2024
44 of 47 checks passed
@chenqi0805 chenqi0805 deleted the enh/use-tmp-folder-for-default-db-path branch October 9, 2024 18:54
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.

3 participants