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

[BUG] Match Tracker module PK_MatchRecords duplicate key constraint #304

Closed
AtomicLiquid opened this issue Sep 29, 2024 · 2 comments · Fixed by #312
Closed

[BUG] Match Tracker module PK_MatchRecords duplicate key constraint #304

AtomicLiquid opened this issue Sep 29, 2024 · 2 comments · Fixed by #312
Assignees

Comments

@AtomicLiquid
Copy link
Member

Describe the bug
During setup of the XPEvo matches, the match tracker module threw an error related to a duplicate key constraint for PK_MatchRecords.

To Reproduce
Steps to reproduce the behavior:

  1. Run /toornament_setup with ToornamentModule enabled

Additional context

2024 07:17:25.5833] fail: EvoSC.Modules.Official.MatchTrackerModule.Repository.MatchRecordRepository[0] Failed to add match state record Npgsql.PostgresException (0x80004005): 23505: duplicate key value violates unique constraint "PK_MatchRecords"    at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|234_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)    at Npgsql.NpgsqlDataReader.<ReadMessage>g__ReadMessageSequential|44_0(NpgsqlConnector connector, Boolean async)    at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)    at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)    at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)    at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)    at Npgsql.NpgsqlCommand.ExecuteScalar(Boolean async, CancellationToken cancellationToken)    at LinqToDB.Data.DataConnection.ExecuteScalarAsync(CancellationToken cancellationToken)    at LinqToDB.Data.DataConnection.ExecuteScalarDataAsync(CancellationToken cancellationToken)    at LinqToDB.Data.DataConnection.ExecuteScalarDataAsync(CancellationToken cancellationToken)    at LinqToDB.Data.DataConnection.QueryRunner.ExecuteScalarAsync(CancellationToken cancellationToken)    at LinqToDB.Linq.QueryRunner.ScalarQueryAsync(Query query, IDataContext dataContext, Expression expression, Object[] ps, Object[] preambles, CancellationToken cancellationToken)    at LinqToDB.Linq.QueryRunner.ScalarQueryAsync(Query query, IDataContext dataContext, Expression expression, Object[] ps, Object[] preambles, CancellationToken cancellationToken)    at LinqToDB.Linq.QueryRunner.InsertWithIdentity`1.QueryAsync(IDataContext dataContext, T obj, InsertColumnFilter`1 columnFilter, String tableName, String serverName, String databaseName, String schemaName, TableOptions tableOptions, CancellationToken token)    at EvoSC.Modules.Official.MatchTrackerModule.Repository.MatchRecordRepository.InsertStateAsync(IMatchState state) in /source/src/Modules/MatchTrackerModule/Repository/MatchRecordRepository.cs:line 33   Exception data:     Severity: ERROR     SqlState: 23505     MessageText: duplicate key value violates unique constraint "PK_MatchRecords"     File: ../../src/yb/yql/pggate/pg_perform_future.cc     Line: 36     Routine: YBEndOperationsBuffering
@AtomicLiquid AtomicLiquid added the bug Something isn't working label Sep 29, 2024
@snixtho snixtho self-assigned this Oct 5, 2024
@snixtho
Copy link
Member

snixtho commented Oct 5, 2024

Will need more specific reproducible steps as getting the Toornament module to even run is quite a struggle. And I do not see how calling this command would even trigger anything related to match records. I assume when you click to set up a match, not just calling the command will trigger the error.

The exception itself is very uninformative and does not give a good hint on what the issue is.

Will need alot more info than provided here.

@snixtho
Copy link
Member

snixtho commented Oct 5, 2024

A potential idea for a fix was found after a DM discussion, but verification is needed.

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

Successfully merging a pull request may close this issue.

2 participants