* perf(repository): add indexes on sp_idx_action_rollout_group_status and sp_idx_action_rollout_status
Rollout monitoring queries (existsByRolloutId, getStatusCountByRolloutId, getStatusCountByRolloutGroupId) filter by rollout or rollout_group on sp_action. The flyway baseline did not index either column, so Postgres
falls back to Seq Scan on every monitoring poll. With 16k action rows this is meaningful — the group-count query takes ~500 ms without the index and ~27 ms with it (Index Only Scan, Heap Fetches: 0).
Bench (16k rows, 1000 iter):
- WHERE tenant=? AND rollout_group=? 18.6x faster on PG
17.6x faster on YugabyteDB
- WHERE tenant=? AND rollout=? GROUP BY status 2.5x faster on PG
1.5x faster on YugabyteDB
Adds V1_20_2 sibling migrations for POSTGRESQL, H2, and MYSQL.
Notes:
1. (!) Eclipselink shall be migrated to 5.0 (in 4.0.8 there are incompatible classes, e.g EJBQueryImpl doesn't implement some newer methods). In the moment is with beta (5.0.0-B12) - JUST for testing!
2. (!) Ethlo plugin doesn't work with Eclipselink 5.0, it builds with Eclipselink 4.0.8 (could be a problem)
3. Dependencies - new starters, test starters changes, some dependencies refactoring
4. Auto-configs split - package changes, some properties classes changes
5. Spring nullable org.springframework.lang.Nullable/NonNull are depecated and replaced with jspcify -> org.jspecify.annotations.Nullable/NonNull (NullMarked)
6. Lombok config - adding lombok.addNullAnnotations=jspecify - to do not mess annotations
7. Distributed lock table changes - SP_LOCK table db migration
8. Spring Retry replaced with Spring Core Retry - does repace retry in hawkbit
9. Specifications -> added Update/Delete(/Predicate) Specifications and JpaSpecificationExecutor changed
10. HawkbitBaseRepositoryFactoryBean modified to register properly
11. Jackson - 2 -> 3, package migrations, finals are not deserialized by default(enable finals deserialization, consider make non-final), too ‘smart’ tries to set complex objects instead of using non args constructor (-> @JsonIgnore), some other default configs made
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
* Tenant Configuration values varchar to text - support bigger values for configs
access_control_context varchar to text - support bigger values for configs
* Add size constraint in App for Tenant 'conf.value' and rollout/target_filter_query 'access_control_context
* add explicitly not null constraint for clarity
* Add baselines for hawkbit 1.0
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
* Add SQL format, close to the already used
* Organize and unify
* Refactor B1_POSTGRES index names
* Revert ignoreMigrationPattern - will be included in separate PR
---------
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
Co-authored-by: vasilchev <vasil.ilchev@bosch.com>
* Schema changes int->tinyint and foreginkeys/indexes rename
* Optimize schema migration to do all related changes within one statement per table - i.e. no redundant table re-builds
* Foreign key checks disabled for huge dbs
* Merge unify and convergence schemas as they both do migrations on common tables - reduce downtime
* Rename unify schema
* actions.cleanup.onQuotaHit.percent -> action.cleanup.onQuotaHit.percent
* action.cleanup.enabled - removed - instead enabled / disable <=> expire < / >= 0
* action.cleanup.actionExpiry -> action.cleanup.auto.expiry and action.cleanup.auto.status - so both are under action.cleanup.auto, and differentiate from on quota hit
* auto db convert of props with one backward incompatibility - if you had action.cleanup.enabled=true and not set action.cleanup.actionExpiry (assuming default 30 days) - auto cleanup will be disabled
you should set action.cleanup.auto.expiry=2592000000 in order to get the old behavior
* Note that if you have configured global action cleanup the properties are changed also this config you shall change manually
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
* add `min artifacts` requirement on the Software Module Type level for Software Module completeness
* removed `complete` Distribution Set property from DB - calculated runtime
* Distribution Set and Software Module completeness is calcualted on demand in memory (TODO: implement cache)
* locking of Software Module now requires the software module to be `completed`
* removed 'complete' search field for DistributionSet type. Still keep (DEPRECATED) limited support for search with 'complete' -
only on the first level of expression and with AND. I.e. complete==true, complete==false and id=in=(1, 3) is suppoted,
while complete==false or id=in=(1, 3) and id=in(1, 3) and (type==os and complete==true) are not
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
* added postgress docker compose examples
* move mysql flyway into server (remove from hawkbit-repository-jpa-flyway)
* in starters is added posgress and sqlserver flyway support - see [Flyway Modularity](https://github.com/flyway/flyway/issues/3780)
_release_notes_
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
Now it is not part of the ddi and dmf starters - only mgmt (where could be excluded on packaging)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>