This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-API] [PATCH 0 of 3] Never GC internal and/or active sessions.

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 0 of 3] Never GC internal and/or active sessions.
From: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
Date: Tue, 8 Dec 2009 14:54:33 +0000
Delivery-date: Tue, 08 Dec 2009 06:57:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Modify the GCing of sessions to be the following:

1/ internal sessions are cached on each host; that means only one internal 
session per host should be created in a pool; that also means that internal RPC 
call will no more do login/call/logout but only call (so potentially that 
should speed-up complex RPC calls);

2/ it is now possible to get all the tasks created using a specific session 
(Db.Session.get_tasks) and thus to know whether a session is active or not;

3/ Now, only inactive and external sessions are GCed (ie with no pending tasks 
and with Db.session.pool = false).

8 files changed, 62 insertions(+), 43 deletions(-)
ocaml/idl/datamodel.ml              |    2 +
ocaml/idl/ocaml_backend/context.ml  |    5 ++
ocaml/idl/ocaml_backend/context.mli |    1 
ocaml/xapi/db_gc.ml                 |   11 ++++--
ocaml/xapi/helpers.ml               |   64 ++++++++++++++++-------------------
ocaml/xapi/message_forwarding.ml    |    5 --
ocaml/xapi/xapi.ml                  |    3 -
ocaml/xapi/xapi_globs.ml            |   14 +++++++

xen-api mailing list