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

PostgreSQLadvisoryLockBasedProxyManager does not work with String keys #400

Closed
vladimir-bukhtoyarov opened this issue Aug 6, 2023 · 1 comment

Comments

@vladimir-bukhtoyarov
Copy link
Collaborator

vladimir-bukhtoyarov commented Aug 6, 2023

Found in this comment #382 (reply in thread)

io.github.bucket4j.BucketExceptions$BucketExecutionException: io.github.bucket4j.BucketExceptions$BucketExecutionException: org.postgresql.util.PSQLException: ERROR: function pg_advisory_xact_lock(character varying) does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.
  Position: 8
	at io.github.bucket4j.distributed.proxy.generic.pessimistic_locking.AbstractLockBasedProxyManager.execute(AbstractLockBasedProxyManager.java:83)
	at io.github.bucket4j.distributed.proxy.generic.pessimistic_locking.AbstractLockBasedProxyManager.execute(AbstractLockBasedProxyManager.java:50)
	at io.github.bucket4j.distributed.proxy.AbstractProxyManager$DefaultRemoteBucketBuilder$1.lambda$execute$0(AbstractProxyManager.java:197)
	at io.github.bucket4j.distributed.proxy.ExecutionStrategy$1.execute(ExecutionStrategy.java:43)
	at io.github.bucket4j.distributed.proxy.AbstractProxyManager$DefaultRemoteBucketBuilder$1.execute(AbstractProxyManager.java:198)
	at io.github.bucket4j.distributed.proxy.DefaultBucketProxy.execute(DefaultBucketProxy.java:208)
	at io.github.bucket4j.distributed.proxy.DefaultBucketProxy.reserveAndCalculateTimeToSleepImpl(DefaultBucketProxy.java:99)
	at io.github.bucket4j.AbstractBucket.tryConsumeUninterruptibly(AbstractBucket.java:241)
	at io.github.bucket4j.tck.AbstractDistributedBucketTest.lambda$testTryConsumeWithLimit$10(AbstractDistributedBucketTest.java:223)
	at io.github.bucket4j.util.ConsumerThread.run(ConsumerThread.java:37)
Caused by: io.github.bucket4j.BucketExceptions$BucketExecutionException: org.postgresql.util.PSQLException: ERROR: function pg_advisory_xact_lock(character varying) does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.
  Position: 8
	at io.github.bucket4j.postgresql.PostgreSQLadvisoryLockBasedProxyManager$1.lockAndGet(PostgreSQLadvisoryLockBasedProxyManager.java:119)
	at io.github.bucket4j.distributed.proxy.generic.pessimistic_locking.AbstractLockBasedProxyManager.execute(AbstractLockBasedProxyManager.java:80)
	... 9 more
Caused by: org.postgresql.util.PSQLException: ERROR: function pg_advisory_xact_lock(character varying) does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.
  Position: 8
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
	at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:134)
	at com.zaxxer.hikari.proxy.PreparedStatementProxy.executeQuery(PreparedStatementProxy.java:52)
	at com.zaxxer.hikari.proxy.PreparedStatementJavassistProxy.executeQuery(PreparedStatementJavassistProxy.java)
	at io.github.bucket4j.postgresql.PostgreSQLadvisoryLockBasedProxyManager$1.lockAndGet(PostgreSQLadvisoryLockBasedProxyManager.java:105)
	... 10 more
@vladimir-bukhtoyarov
Copy link
Collaborator Author

released with version 8.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant