[ 
https://issues.apache.org/jira/browse/GUACAMOLE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352763#comment-17352763
 ] 

Mike Jumper commented on GUACAMOLE-1198:
----------------------------------------

Doing some research into the history of the database backends, this behavior 
was last present in 0.9.5, back when the only supported database was MySQL:

https://github.com/apache/guacamole-client/blob/7b32adad97b84048fb956097515adcc8c11f796c/extensions/guacamole-auth-mysql/src/main/java/net/sourceforge/guacamole/net/auth/mysql/ActiveConnectionMap.java#L488-L490
 (0.9.5)

Sometime during the migration toward a more generic database implementation 
with multiple possible backends (as support for PostgreSQL was introduced via 
https://jira.glyptodon.com/browse/GUAC-1101), this behavior was not 
implemented, with no {{UPDATE}} query being provided at all:

https://github.com/apache/guacamole-client/blob/52d61d8dbc3a6b9af948e4c2f9ac95992ceeec18/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/glyptodon/guacamole/auth/jdbc/connection/ConnectionRecordMapper.xml
 (0.9.6)

I'm sure _not_ implementing the original functionality was a conscious choice 
during that migration, but I don't recall the reasoning nor why the behavior 
was never restored in the ~6 years since. It's probably worth researching to 
make sure that restoring this is OK.

My guess is:

* There is no inherent issue with restoring this.
* The old behavior was omitted for simplicity during the already complex 
migration from MySQL-only to multiple database backends.
* The schema and documentation were left as-is since there is (theoretically) 
no harm in providing and documenting a _representation_ for active connections 
within history, even if that representation is not currently used in practice. 
This would also allow for historical database entries from the pre-0.9.6 days 
to continue existing.

> Show active connections in "guacamole_connection_history"
> ---------------------------------------------------------
>
>                 Key: GUACAMOLE-1198
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1198
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole, guacamole-auth-jdbc-mysql
>    Affects Versions: 1.2.0
>            Reporter: Julien Calvas
>            Priority: Minor
>         Attachments: 2020-10-27_11h53_24.png
>
>
> In the table "guacamole_connection_history", the documentation says that :
> _"+*end_date*+ : The time at which the connection ended. If the connection is 
> still active, the value in this column will be NULL. Despite its name, this 
> column also stores time information in addition to the date."_
> _[=> 
> LINK|https://guacamole.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-schema-connection-history]_
> But despite this annotation, connections are only stored when completed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to