From 3925d92fd4c276303b434cd53e00de5f6529c0f7 Mon Sep 17 00:00:00 2001 From: ViacheslavKlimov Date: Thu, 3 Oct 2024 13:04:06 +0300 Subject: [PATCH 1/2] Drop max Hikari pool size to 4 for dedicated datasource --- application/src/main/resources/thingsboard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml index bfed0c06d3..a4bd4c3065 100644 --- a/application/src/main/resources/thingsboard.yml +++ b/application/src/main/resources/thingsboard.yml @@ -802,7 +802,7 @@ spring: # This property controls the amount of time that a connection can be out of the pool before a message is logged indicating a possible connection leak for events datasource. A value of 0 means leak detection is disabled leakDetectionThreshold: "${SPRING_EVENTS_DATASOURCE_HIKARI_LEAK_DETECTION_THRESHOLD:0}" # This property increases the number of connections in the pool as demand increases for events datasource. At the same time, the property ensures that the pool doesn't grow to the point of exhausting a system's resources, which ultimately affects an application's performance and availability - maximumPoolSize: "${SPRING_EVENTS_DATASOURCE_MAXIMUM_POOL_SIZE:16}" + maximumPoolSize: "${SPRING_EVENTS_DATASOURCE_MAXIMUM_POOL_SIZE:4}" # Enable MBean to diagnose pools state via JMX for events datasource registerMbeans: "${SPRING_EVENTS_DATASOURCE_HIKARI_REGISTER_MBEANS:false}" From 8c0fbbc69b956e8d506bc4cd615dbe28770e03e4 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Thu, 3 Oct 2024 15:21:10 +0300 Subject: [PATCH 2/2] UI: Fixed the inability to edit resource type in resource library when created resource --- .../home/pages/admin/resource/resources-library.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/pages/admin/resource/resources-library.component.ts b/ui-ngx/src/app/modules/home/pages/admin/resource/resources-library.component.ts index de6a62e15c..e9b602e7d3 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/resource/resources-library.component.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/resource/resources-library.component.ts @@ -92,7 +92,7 @@ export class ResourcesLibraryComponent extends EntityComponent impleme override updateFormState(): void { super.updateFormState(); - if (this.isEdit && this.entityForm) { + if (this.isEdit && this.entityForm && !this.isAdd) { this.entityForm.get('resourceType').disable({ emitEvent: false }); if (this.entityForm.get('resourceType').value !== ResourceType.JS_MODULE) { this.entityForm.get('fileName').disable({ emitEvent: false });