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

Script: Configuration driven validation for CtxMap #6

Open
wants to merge 44 commits into
base: ingest_sm_to_ctx_map
Choose a base branch
from

Commits on Jul 11, 2022

  1. Improve error when sorting on incompatible types (elastic#88399)

    Currently when sorting on incompatible types, we get
    class_cast_exception error (code 500). This patch improves
    the error to explain that the problem is because
    of incompatible sort types for the field across
    different shards and returns user error (code 400).
    
    Closes elastic#73146
    mayya-sharipova authored Jul 11, 2022
    Configuration menu
    Copy the full SHA
    4cc8484 View commit details
    Browse the repository at this point in the history
  2. Script: Configuration driven validation for CtxMap

    Adds FieldProperties record that configures how to validate
    fields.  Fields have a type, are writeable or read-only, and nullable
    or not and may have an additional validation useful for Set/Enum
    validation.
    
    Splits IngestMetadata from Metadata in preparation for new Metdata
    subclasses.
    stu-elastic committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    86b35ed View commit details
    Browse the repository at this point in the history
  3. Fix hashCode in CtxMap

    stu-elastic committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    472b824 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'ingest_ctx_map' of github.com:stu-elastic/elasticsearch…

    … into ingest_ctx_map_field_prop
    stu-elastic committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    1a0ef93 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2022

  1. Merge branch 'ingest_sm_to_ctx_map' of github.com:stu-elastic/elastic…

    …search into ingest_ctx_map_field_prop
    stu-elastic committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    48c62de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b55a0bc View commit details
    Browse the repository at this point in the history
  3. Fix unit tests

    stu-elastic committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    f9ac7ae View commit details
    Browse the repository at this point in the history
  4. FieldProperty javadoc

    stu-elastic committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    15328b1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    824cdc8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c39bb9d View commit details
    Browse the repository at this point in the history
  7. _type can be updated

    stu-elastic committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    e81f5fa View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7276bb0 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    78244b7 View commit details
    Browse the repository at this point in the history
  10. Don't index geo_shape field in AbstractBuilderTestCase (elastic#88437)

    This commit stops adding the geo_shape field mapper by default and adds the mapper only when it is needed.
    iverase authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    dd1bd83 View commit details
    Browse the repository at this point in the history
  11. Reduce map lookups (elastic#88418)

    This change replcase 2 hash map operations with a single one and a null
    check.
    idegtiarenko authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    47510ad View commit details
    Browse the repository at this point in the history
  12. Make ClusterInfo use immutable maps in all cases (elastic#88447)

    This class's maps are used very hot in the disk threshold allocation
    decider. Moving them from hppc maps to unmodifiable map wrapping
    `HashMap` has led to a measurable slowdown in the many-shards benchmark
    bootstrapping. Lets use immutable map copies here exclusively to make
    performance outright better and more predictable via a single implementation.
    original-brownbear authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    9ebbe1c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a4ec9c6 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ecc9605 View commit details
    Browse the repository at this point in the history
  15. Pass IndexMetadata to AllocationDecider.can_remain (elastic#88453)

    We need the metadata in a number of allocation deciders and pass it to other allocation methods.
    Passing it here avoids redundant lookups across deciders.
    original-brownbear authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    4889650 View commit details
    Browse the repository at this point in the history
  16. Polish reworked LoggedExec task (elastic#88424)

    Some polishing of reworked LoggedExec task
    breskeby authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    a2ee4c5 View commit details
    Browse the repository at this point in the history
  17. Updatable API keys - logging audit trail event (elastic#88276)

    This PR adds a new audit trail event for when API keys are updated.
    n1v0lg authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    c56715f View commit details
    Browse the repository at this point in the history
  18. Bound random negative size test in SearchSourceBuilderTests#testNegat…

    …iveSizeErrors (elastic#88457)
    
    -1 is handled differently by the xcontent code path so this test will fail when `randomIntBetween` lands on -1.
    
    To fix, we add another integer for the xcontent test which starts at -2.
    matschaffer authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    5628b87 View commit details
    Browse the repository at this point in the history
  19. Audit API key ID when create or grant API keys (elastic#88456)

    The API key ID generation is handled by the Request class since elastic#63221.
    This makes it possible to audit it when creating or granting API keys.
    This PR makes the necessary changes for it to happen.
    
    Relates: elastic#63221
    ywangd authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    24d2520 View commit details
    Browse the repository at this point in the history
  20. TSDB: RollupShardIndexer logging improvements (elastic#88416)

    1. Add trace log guards to avoid high cost method
    2. Log the time it took to rollup a shard
    weizijun authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    3ed549b View commit details
    Browse the repository at this point in the history
  21. Stop registering TestGeoShapeFieldMapperPlugin in ESIntegTestCase (el…

    …astic#88460)
    
    Instead of registering the plugin by default, implementations that need it are responsible on registering the plugin.
    iverase authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    4af02b8 View commit details
    Browse the repository at this point in the history
  22. Use consistent shard map type in IndexService (elastic#88465)

    It's faster and easier to reason about if we always have
    an immutable collections map here and not have the type depend
    on what the last operation on the index service was.
    original-brownbear authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    47ecd20 View commit details
    Browse the repository at this point in the history
  23. Corrected an incomplete sentence. (elastic#86542)

    * Corrected an incomplete sentence.
    
    * Update docs/reference/aggregations/metrics/avg-aggregation.asciidoc
    
    Co-authored-by: Christos Soulios <[email protected]>
    
    Co-authored-by: David Kilfoyle <[email protected]>
    Co-authored-by: Christos Soulios <[email protected]>
    3 people authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    67cacde View commit details
    Browse the repository at this point in the history
  24. Updatable API keys - noop check (elastic#88346)

    This PR adds a noop check for API key updates. If we detect a noop
    update, i.e., an update that does not result in any changes to the
    existing doc, we skip the index step and return updated = false in
    the response.
    
    This PR also extends test coverage around various corner cases.
    n1v0lg authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    28048a5 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    bb95041 View commit details
    Browse the repository at this point in the history
  26. INFO logging of snapshot restore and completion (elastic#88257)

    But DEBUG (silent) logging of snapshot restore/completion when
    done in the context of CCR or searchable snapshots.
    kingherc authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    1e07915 View commit details
    Browse the repository at this point in the history
  27. Fix ReactiveStorageDeciderServiceTests testNodeSizeForDataBelowLowWat…

    …ermark (elastic#88452)
    
    Fix this test unexpectedly being off by one by increasing the accuracy of the fp division
    (better to have a larger dividend and divisor) a little. I could easily reproduce the failure
    without the fix but with it, the test cases we use at least run accurate with the change.
    
    closes elastic#88433
    original-brownbear authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    84af493 View commit details
    Browse the repository at this point in the history
  28. Avoid noisy exceptions on data nodes when aborting snapshots (elastic…

    …#88476)
    
    Currently, an abort (especially when triggered an index delete) can
    manifest as either an aborted snapshot exception, a missing index exception or
    an NPE. The latter two show up as noise in logs.
    This change catches effectively all of these cleanly as aborted snapshot
    exceptions so they don't get logged as warnings and avoids the NPE if
    a shard was removed from the index service concurrently by using the
    API that throws on missing shards to look it up.
    original-brownbear authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    ba46bd4 View commit details
    Browse the repository at this point in the history
  29. Merge branch 'master' of github.com:stu-elastic/elasticsearch into in…

    …gest_ctx_map_field_prop
    stu-elastic committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    7be1f41 View commit details
    Browse the repository at this point in the history
  30. Track the count of failed invocations since last successful policy sn…

    …apshot (elastic#88398)
    
    Add tracking for the number of invocations that have passed between a successful SLM snapshot 
    and the most recent failure. These stats would be helpful for reporting on SLM policy health.
    jbaiera authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    b790256 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    c636e43 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    08c54f1 View commit details
    Browse the repository at this point in the history
  33. Move runtime fields base scripts out of scripting fields api package. (

    …elastic#88488)
    
    Two runtime fields script classes were placed into the package for the scripting fields api. These have 
    been moved to the script package where the rest of the runtime fields script classes live. This is a 
    purely mechanical change.
    jdconrad authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    c271d39 View commit details
    Browse the repository at this point in the history
  34. Ingest: Start separating Metadata from IngestSourceAndMetadata (elast…

    …ic#88401)
    
    Pull out the implementation of `Metadata` from `IngestSourceAndMetadata`.
    
    `Metadata` will become a base class extended by the update contexts: ingest, update, update by query and reindex.
    
    `Metadata` implements a map-like interface, making it easy for a class containing `Metadata` to implement the full `Map` interface.
    stu-elastic authored Jul 12, 2022
    Configuration menu
    Copy the full SHA
    39de085 View commit details
    Browse the repository at this point in the history
  35. Merge branch 'master' of github.com:stu-elastic/elasticsearch into in…

    …gest_ctx_map_field_prop
    stu-elastic committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    e27d73a View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    9c7b389 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    5a45f97 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. Configuration menu
    Copy the full SHA
    dc1fc58 View commit details
    Browse the repository at this point in the history
  2. Don't copy source

    stu-elastic committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    a08afb8 View commit details
    Browse the repository at this point in the history
  3. Revert "Don't copy source"

    This reverts commit a08afb8.
    stu-elastic committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    8eb42c6 View commit details
    Browse the repository at this point in the history