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

Less warnings for expensive scans #1432

Closed
gramian opened this issue Jan 18, 2024 · 3 comments
Closed

Less warnings for expensive scans #1432

gramian opened this issue Jan 18, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@gramian
Copy link
Collaborator

gramian commented Jan 18, 2024

ArcadeDB Version:

ArcadeDB Server v23.12.2 (build 1a7716d309bbcbfdac089d42adee56b38fe2f6d3/1705309274480/main)

OS and JDK Version:

Running on Mac OS X 12.7 - OpenJDK 64-Bit Server VM 17.0.9 (Homebrew)

I certain situation warnings pollute the log, for example running a script that is scanning an unindexed property.

Expected behavior

I have three possible solutions:

  1. The warning below can be switched off globally with a setting.
  2. The warning below is off when the server is in production mode.
  3. Warnings will always be displayed only once for a scan of a certain property.

Actual behavior

"WARNI [FetchFromClassExecutionStep] Attempt to scan type 'test' of total size 706.06MB. This operation is very expensive, consider using an index"
lvca added a commit that referenced this issue Jan 18, 2024
Added this new global setting:
  COMMAND_WARNINGS_EVERY("arcadedb.command.warningsEvery", SCOPE.JVM,
      "Reduce warnings in commands to print in console only every X occurrences. Use 0 to disable warnings with commands",
      Integer.class, 100),

Fixed issue #1432
@lvca lvca self-assigned this Jan 18, 2024
@lvca lvca added the enhancement New feature or request label Jan 18, 2024
@lvca lvca added this to the 24.1.1 milestone Jan 18, 2024
@lvca
Copy link
Contributor

lvca commented Jan 18, 2024

Added this new setting:

  COMMAND_WARNINGS_EVERY("arcadedb.command.warningsEvery", SCOPE.JVM,
      "Reduce warnings in commands to print in console only every X occurrences. Use 0 to disable warnings with commands",
      Integer.class, 100),

I still believe it's useful in production. So many users found that some queries were not using any indexes and therefore tons of expensive scans were made.

@lvca lvca closed this as completed Jan 18, 2024
@gramian
Copy link
Collaborator Author

gramian commented Jan 18, 2024

@lvca This is a very elegant solution. I like it very much! One question though: Does it only print every N-th warning of all warnings or every N-th warning of every type of warning?

BTW: I will add docu for this setting tomorrow.

lvca added a commit that referenced this issue Jan 18, 2024
@lvca
Copy link
Contributor

lvca commented Jan 18, 2024

@gramian good point, little change to make each warning unique in the counters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants