Skip to Content.
Sympa Menu

freetds - Re: Cancel problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Cancel problem
  • Date: Wed, 4 Sep 2002 17:59:38 +0200


>
> Ok, I was erroring on the side of safety. But if we can in
> fact optimize
> this by discarding whole packets then maybe we should. We
> could do like:
>
> tds_read_packet() until header flag is 0x0f, then do normal processing
> until done w/ cancel flag. It could still be all done inside
> tds_process_cancel(), I think this is post 0.60 work. The patch as is
> should be fairly non-distruptive.
>
Yes, I think so.

Also note that you must not only test for 0xf but even for 0x3 (eom /
acknowledge).

Also I'd like to see another small modification... cancel stuff should work
on multithread. We have always stated that tds should be thread safe (well,
if thread safe is enabled) so only a thread should use a connection at a
time.. well this should not be true for cancel. A cancel can be issued from
another thread...
Not so easy to handle, I know, but is a specification of dbcancel and
SQLCancel (and I think even for ctlib is the same)... Thinking for solution
a first problem that raise is: how can stop first thread (stopped in read)?
Solution is quite easy: after send cancel server send some byte, so it
unhold first thread... if this timeout closing socket unhold thread... other
stuff are controlling critical section and events (quite complicated). This
is another motivation of TDS_CANCELLING state...

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page