Skip to content

Commit

Permalink
dcache-qos,system-test: override db property to hsqldb
Browse files Browse the repository at this point in the history
Motivation:

During system tests:

```
Unexpected error running Liquibase: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname
and port are correct and that the postmaster is accepting TCP/IP connections.
ERROR - org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that
the postmaster is accepting TCP/IP connections.
liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: org.postgresql.util.PSQLException: Connection to
localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
	at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:69)
	at liquibase.integration.commandline.Main.doMigration(Main.java:884)
	at liquibase.integration.commandline.Main.run(Main.java:175)
	at liquibase.integration.commandline.Main.main(Main.java:94)
```

Neglected to override the new db properties for `qos-engine`.

Modification:

Added the override to the hsqlsdb properties.

Result:

No more stack trace/connection failure to postgresqls (?).

Target: master
Patch: https://rb.dcache.org/r/14099/
Requires-notes: no (unreleased)
Acked-by: Svenja
  • Loading branch information
alrossi committed Sep 14, 2023
1 parent 8ee9895 commit 29f340d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
2 changes: 2 additions & 0 deletions plugins/hsqldb/src/main/skel/hsqldb.properties
Expand Up @@ -42,3 +42,5 @@ qos.db.hikari-properties!maxLifetime = 0
qos-verifier.db.url=jdbc:hsqldb:file:${hsqldb.path}/${qos-verifier.db.name};shutdown=true;hsqldb.tx=mvcc;hsqldb.sqllog=3
qos-verifier.db.hikari-properties!maxLifetime = 0

qos-engine.db.url=jdbc:hsqldb:file:${hsqldb.path}/${qos-engine.db.host};shutdown=true;hsqldb.tx=mvcc;hsqldb.sqllog=3
qos-engine.db.hikari-properties!maxLifetime = 0
33 changes: 0 additions & 33 deletions skel/share/defaults/qos-scanner.properties
Expand Up @@ -170,36 +170,3 @@ qos.limits.scanner.online-window=2
(one-of?MILLISECONDS|SECONDS|MINUTES|HOURS|DAYS)qos.limits.scanner.online-window.unit=DAYS
qos.limits.scanner.qos-nearline-batch-size=500000
qos.limits.scanner.online-batch-size=200000

# ---- Configuration for scanner database connection pool ---------------------------
#
# The database connection pool reuses connections between successive
# database operations. By reusing connections dCache doesn't suffer
# the overhead of establishing new database connections for each
# operation.
#
# The options here determine how qos behaves as the number of concurrent
# requests fluctuates.
# ---------------------------------------------------------------------------
qos-scanner.db.connections.max=10

# ---- The minimum number of idle database connections.
#
qos-scanner.db.connections.idle=1

(prefix)qos-scanner.db.hikari-properties = Hikari-specific properties

# ---- Database related settings reserved for internal use.
#
(immutable)qos-scanner.db.name=qos
qos-scanner.db.host=${dcache.db.host}
qos-scanner.db.user=${dcache.db.user}
qos-scanner.db.password=${dcache.db.password}
qos-scanner.db.password.file=${dcache.db.password.file}
qos-scanner.db.url=jdbc:postgresql://${qos-scanner.db.host}/${qos-scanner.db.name}?targetServerType=master
qos-scanner.db.schema.changelog=org/dcache/qos/model/db.changelog-master.xml
qos-scanner.db.schema.auto=${dcache.db.schema.auto}

# ---- Used with listing of file operations.
#
qos-scanner.db.fetch-size=1000
3 changes: 0 additions & 3 deletions skel/share/services/qos-scanner.batch
Expand Up @@ -9,9 +9,6 @@ check -strong qos.home
check -strong qos.db.namespace.connections.max
check -strong qos.db.namespace.connections.idle
check -strong qos.db.namespace.fetch-size
check -strong qos-scanner.db.connections.max
check -strong qos-scanner.db.connections.idle
check -strong qos-scanner.db.fetch-size
check -strong qos.plugins.storage-info-extractor
check -strong qos.limits.scanner.submit-threads
check -strong qos.limits.scanner.task-threads
Expand Down

0 comments on commit 29f340d

Please sign in to comment.