steve icon indicating copy to clipboard operation
steve copied to clipboard

Multiple StartTransaction Requests Accepted on Same Connector Leading to Concurrent Transactions

Open Tano-Coppoletta opened this issue 9 months ago • 1 comments

Checklist

  • [ ] I checked other issues already, but found no answer/solution
  • [x] I checked the documentation and wiki, but found no answer/solution
  • [ ] I am running the latest version and the issue still occurs
  • [x] I am sure that this issue is about SteVe (and not about the charging station software or something unrelated to SteVe)

Specifications

SteVe Version     : 3.6.0
Operating system  : Ubuntu 22.04.1
JDK               : openjdk version "11.0.20.1"
Database          : version 1.0.3

Expected Behavior

When a sequence of StartTransaction messages is sent for a connector just the first one should be accepted, subsequent StartTransaction messages with the same connectorId and idTag should be rejected with an appropriate status, such as "ConcurrentTx". The system should prevent multiple transactions from being initiated concurrently on the same connector by the same user (idTag).

Actual Behavior

Multiple StartTransaction messages with the same connectorId and idTag are being accepted and processed as unique transactions, each with a unique transactionId. This behavior seems to violate the OCPP specification regarding the management of concurrent transactions on the same connector.

Steps to Reproduce the Problem

Sent multiple StartTransaction messages in quick succession with identical connectorId, idTag, and meterStart, the problem persist also using different idTags but same connectorId:

[2,"1","StartTransaction", {"connectorId": 2, "idTag": "6", "meterStart": 1000, "reservationId": 11, "timestamp": "2023-11-04T11:35:50Z"}]
[2,"1","StartTransaction", {"connectorId": 2, "idTag": "6", "meterStart": 1000, "reservationId": 11, "timestamp": "2023-11-04T11:35:51Z"}]
[2,"1","StartTransaction", {"connectorId": 2, "idTag": "6", "meterStart": 1000, "reservationId": 11, "timestamp": "2023-11-04T11:35:52Z"}]
[2,"1","StartTransaction", {"connectorId": 2, "idTag": "6", "meterStart": 1000, "reservationId": 11, "timestamp": "2023-11-04T11:35:53Z"}]

Received Accepted status for all transactions with unique transactionIds:

[3,"1",{"transactionId":676989,"idTagInfo":{"status":"Accepted","expiryDate":"2023-11-08T00:05:22.061Z"}}]
[3,"1",{"transactionId":676990,"idTagInfo":{"status":"Accepted","expiryDate":"2023-11-08T00:05:22.063Z"}}]
[3,"1",{"transactionId":676991,"idTagInfo":{"status":"Accepted","expiryDate":"2023-11-08T00:05:22.077Z"}}]
[3,"1",{"transactionId":676992,"idTagInfo":{"status":"Accepted","expiryDate":"2023-11-08T00:05:22.081Z"}}]

The acceptance of multiple transactions in such a manner could lead to data integrity issues and operational discrepancies within the charging station management system. It is expected that the system should adhere to the OCPP specification's guidance on handling concurrent transactions to ensure reliable and consistent transaction management.

Thank you for your time and attention to this matter.

Tano-Coppoletta avatar Nov 07 '23 23:11 Tano-Coppoletta

@Tano-Coppoletta Steve allows to configure concurrent transaction checks on ID tag level under Data management -> OCPP tags by setting a positive value to "Max. Active Transaction Count".

lategoodbye avatar Nov 14 '23 21:11 lategoodbye