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

[jpa] Do not log failure to persist item with duplicate timestamp as error #15978

Merged
merged 3 commits into from
Jan 30, 2024

Commits on Nov 29, 2023

  1. [jpa] ignore EntityExistsException

    in case the user manually added a UNIQUE constraint to the database,
    openHAB might send duplicate timestamps.
    
    effectively this means the first attempt is kept, while others are
    dropped. as long as you're using sub-second timestamps, this shouldn't
    be an issue - the state updates truly should be duplicates
    
    Signed-off-by: Cody Cutrer <cody@cutrer.us>
    ccutrer committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    095a433 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2024

  1. debug log when a duplicate item is persisted

    Signed-off-by: Cody Cutrer <cody@cutrer.us>
    ccutrer committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    b4c8cde View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Update bundles/org.openhab.persistence.jpa/src/main/java/org/openhab/…

    …persistence/jpa/internal/JpaPersistenceService.java
    
    Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
    Signed-off-by: Cody Cutrer <cody@cutrer.us>
    ccutrer and jlaur committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    e5934bb View commit details
    Browse the repository at this point in the history