Open frbattid opened 7 years ago
This is because at PostgreSQLBackendImpl.java PostgreSQLCache cache is initialized to null upon declaration:
PostgreSQLBackendImpl.java
PostgreSQLCache cache
https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/postgresql/PostgreSQLBackendImpl.java#L45
Then, only if enable_cache is set to true, cache is initialized with a PostgreSQLCache object:
enable_cache
true
cache
PostgreSQLCache
https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/postgresql/PostgreSQLBackendImpl.java#L58
If not, the data insertion fails when checking if the schema is in the cache:
https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/postgresql/PostgreSQLBackendImpl.java#L86
This issue remains unfixed.
This is because at
PostgreSQLBackendImpl.java
PostgreSQLCache cache
is initialized to null upon declaration:https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/postgresql/PostgreSQLBackendImpl.java#L45
Then, only if
enable_cache
is set totrue
,cache
is initialized with aPostgreSQLCache
object:https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/postgresql/PostgreSQLBackendImpl.java#L58
If not, the data insertion fails when checking if the schema is in the cache:
https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/postgresql/PostgreSQLBackendImpl.java#L86