|
Re: [CDO] Session busy indicator [message #431522 is a reply to message #431520] |
Wed, 15 July 2009 09:51 |
|
Egidijus,
Comments below...
Egidijus Vaisnora schrieb:
>
> How could I find out that CDO session on *server* is busy?
Depends on how you define "busy".
The Session class extends Lifecycle, so you can always ask
LifecycleUtil.isActive(session) or register an IListener with it. But:
The SessionManager automatically detects deactivated sessions and
removes them.
> Idea is that I am closing sessions on server side (let say
> administrator can kill undesired sessions),
What means "undesired"? Why don't you prevent undesired sessions from
the beginning? Or can they *become* undesired?
> however I don't want to kill a session which is reading something from
> the client side - just because to avoid possible data corruption on
> server.
I don't think it's possible to corrupt data on the server. Have you
tried it?
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: [CDO] Session busy indicator [message #431525 is a reply to message #431524] |
Wed, 15 July 2009 11:50 |
|
Egidijus Vaisnora schrieb:
> Eike,
>
> > Depends on how you define "busy".
>
> busy = no commit is currently running from the client to server
I see.
>
> > What means "undesired"? Why don't you prevent undesired sessions from
> > the beginning? Or can they *become* undesired?
>
> undesired = session that is supposed to be closed immediately (session
> management)
I still don't really understand this explanation, but I think I doesn't
matter that much ;-)
>
> > I don't think it's possible to corrupt data on the server. Have you
> > tried it?
>
> Actually, I have few reports (I suppose it was working with derby DB),
> that after similar session closing, model cannot longer
> be used - it gives me reason to believe in data corruption. Why do you
> think that session closing somewhere in the middle of commit cannot
> break model?
The backend (your Derby DB) should be protected by backend transactions.
But I just learned that DDL (create table, etc...) is often not part of
normal transactions. Surprisingly Derby is the only known exception
(known to us). Maybe that's why Derby is so unbelievably slow. It would
be great if you can report in more detail what happens after such
session deactivation in the middle of a CDO transaction. Maybe we can do
better cleanup for the DDL parts of the commit...
Apart from the backend integrity we need to think about the integrity of
the CDO repository infra structure (caches, registries, etc...). These
*should* be protected against commit failure. But we're only human. So,
if you can report concrete problems, ideally with a test case, we would
like to address them.
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
>
>
> Eike Stepper wrote:
>> Egidijus,
>>
>> Comments below...
>>
>>
>> Egidijus Vaisnora schrieb:
>>> How could I find out that CDO session on *server* is busy?
>> Depends on how you define "busy".
>>
>> The Session class extends Lifecycle, so you can always ask
>> LifecycleUtil.isActive(session) or register an IListener with it. But:
>> The SessionManager automatically detects deactivated sessions and
>> removes them.
>>
>>> Idea is that I am closing sessions on server side (let say
>>> administrator can kill undesired sessions),
>> What means "undesired"? Why don't you prevent undesired sessions from
>> the beginning? Or can they *become* undesired?
>>
>>> however I don't want to kill a session which is reading something from
>>> the client side - just because to avoid possible data corruption on
>>> server.
>> I don't think it's possible to corrupt data on the server. Have you
>> tried it?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
Re: [CDO] Session busy indicator [message #431530 is a reply to message #431528] |
Wed, 15 July 2009 12:21 |
|
Guys,
I thought about maintaining an RWLock in the server side session:
"R" refers to the execution of a CDO commit operation.
"W" refers to explicit maintenance of that session, i.e. protection
against multiple concurrent commits.
How about that?
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Stefan Winkler schrieb:
> Eike,
>
> I think what he means is that he wants a way to determine if it is safe
> to shut down the server (e.g., for maintenance).
>
> A definition on store level of that would be that no writer is currently
> checked out (don't care about readers as they do only reading).
>
> So maybe the general request here is for a safe way to shut down the
> server - e.g. put it into a mode where it does not accept any more
> sessions and waits until all session which started writing have finished
> doing so ...
>
> Egidijus, is that what you mean?
>
> Cheers,
> Stefan
>
>
> Eike Stepper schrieb:
>
>> Egidijus,
>>
>> I think we can build a commit gauge into the session protocol.
>> If you want that, please file an enhancement request against HEAD.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Egidijus Vaisnora schrieb:
>>
>>
>>> How could I find out that CDO session on *server* is busy?
>>> Idea is that I am closing sessions on server side (let say
>>> administrator can kill undesired sessions), however I don't want to
>>> kill a session which is reading something from the client side - just
>>> because to avoid possible data corruption on server.
>>>
>>>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Session busy indicator [message #431531 is a reply to message #431528] |
Wed, 15 July 2009 12:38 |
Egidijus Vaisnora Messages: 47 Registered: July 2009 |
Member |
|
|
Something close to this - just at current time I have addressed problem to the single session closing (it is not about whole
server shutdown).
In real, I need to answer question - "is it save (no commit is present) to close particular *server* session?". Or event it
cold be better in this case, that CDO server on session closing shall be responsible to wait while session writing ends and
only then terminate session.
Stefan Winkler wrote:
> Eike,
>
> I think what he means is that he wants a way to determine if it is safe
> to shut down the server (e.g., for maintenance).
>
> A definition on store level of that would be that no writer is currently
> checked out (don't care about readers as they do only reading).
>
> So maybe the general request here is for a safe way to shut down the
> server - e.g. put it into a mode where it does not accept any more
> sessions and waits until all session which started writing have finished
> doing so ...
>
> Egidijus, is that what you mean?
>
> Cheers,
> Stefan
>
>
> Eike Stepper schrieb:
>> Egidijus,
>>
>> I think we can build a commit gauge into the session protocol.
>> If you want that, please file an enhancement request against HEAD.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Egidijus Vaisnora schrieb:
>>
>>> How could I find out that CDO session on *server* is busy?
>>> Idea is that I am closing sessions on server side (let say
>>> administrator can kill undesired sessions), however I don't want to
>>> kill a session which is reading something from the client side - just
>>> because to avoid possible data corruption on server.
>>>
|
|
|
Powered by
FUDForum. Page generated in 0.05999 seconds