I'm noticing a scalability issue with hilo and my web application. Every
time the asp.net application restarts the app domain, the hilo generator
uses a new set of hi values, not exhausting the previous set. This is
causing fragmentation in the ids since the algorithm is more or less:

hi * (maxLo + 1)  + hi  + lo

Using the default maxlo of Int16.MaxValue and assuming a simplified
application with just one table, I get the following: (Application restarts
are simulated, but in ASP.NET the default is 20 minutes of inactivity, IIRC)

Table 1
======
32768
32769
32770
<Application Restart>
65536
65537
65538
<Application Restart>
98304
98305


I understand why this is happening and I don't need support for multiple
concurrent session factories. I read in a previous thread, talk about
keeping the current max hi for each table, that might help but ideally the
generator would restart the hilo assignment where it left off. i.e.

per each table...
get old hi value
get last lo value in db.
check
if lo < maxLo
  current hi
else get new hi.


Have you guys faced this before, is it not an issue to burn through and
fragment these ids?

I rather not set the application pool not to restart, but I guess I could,
MS says it's good practice to have application restart triggers on memory
and time limits for asp.net applications.



-- 
This signature is intentionally left blank

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to