(RADIATOR) MySQL: how to lock tables during addressallocation
Ingvar Bjarnason
ingvarbj at centrum.is
Mon Sep 1 07:24:18 CDT 2003
Hi all,
I´m currently running into problems with <AddressAllocator SQL>. When
running multiple Radiator threads and since there is no locking taking place
between the select and allocatequery the threads are "bumping" into each
other selecting and trying to allocate the same ip addresses for different
clients. This significantly slows down processing. Is there a way to
make <AddressAllocator SQL> lock the tables during processing ?
Here is our Addressallocator clause.
<AddressAllocator SQL>
Identifier adsldhcpallocator
DBSource dbi:mysql:radius:192.168.1.1
DBUsername ******
DBAuth *****
Timeout 10
FailureBackoffTime 120
DefaultLeasePeriod 8640000
LeaseReclaimInterval 8640000
FindQuery select TIME_STAMP, YIADDR, SUBNETMASK, DNSSERVER from
RADPOOL where POOL='%0' and STATE=0 order by TIME_STAMP LIMIT 1
AllocateQuery update RADPOOL set STATE=1,TIME_STAMP=%0, EXPIRY=%1,
USERNAME='%w' where YIADDR='%3' and STATE=0 and TIME_STAMP %4
<AddressPool ADSL>
Subnetmask 255.255.255.255
Range *********************
</AddressPool>
</AddressAllocator>
Best regards,
Ingvar
Ingvar Bjarnason
Engineer
Data Net
Iceland Telecom
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list