1)
Rhino.PersistentHashTable.Tests.PersistentHashTableTests.After_item_expires_it_will_be_removed_on_next_commit
 :
Microsoft.Isam.Esent.Interop.EsentErrorException : Error
NoCurrentRecord (JET_errNoCurrentRecord, Currency not on a record)
Stack Trace:
   at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) in C:\Work
\esent\EsentInterop\Api.cs:line 1489
   at Microsoft.Isam.Esent.Interop.Api.JetIndexRecordCount(JET_SESID
sesid, JET_TABLEID tableid, Int32& numRecords, Int32
maxRecordsToCount) in C:\Work\esent\EsentInterop\Api.cs:line 1007
   at
Rhino.PersistentHashTable.Tests.PersistentHashTableTests.<>c__DisplayClass80.<After_item_expires_it_will_be_removed_on_next_commit>b__7d
(PersistentHashTableActions actions) in c:\jmeckley\OSS\Rhino.GitHub
\ayende-rhino-
pht-5248ab7fe80f61e295ef17cd541f35df056c5215\Rhino.PersistentHashTable.Tests
\PersistentHashTableTests.cs:line 765
   at Rhino.PersistentHashTable.PersistentHashTable.Batch(Action`1
action) in c:\jmeckley\OSS\Rhino.GitHub\ayende-rhino-
pht-5248ab7fe80f61e295ef17cd541f35df056c5215\Rhino.PersistentHashTable
\PersistentHashTable.cs:line 161
   at
Rhino.PersistentHashTable.Tests.PersistentHashTableTests.After_item_expires_it_will_be_removed_on_next_commit
() in c:\jmeckley\OSS\Rhino.GitHub\ayende-rhino-
pht-5248ab7fe80f61e295ef17cd541f35df056c5215\Rhino.PersistentHashTable.Tests
\PersistentHashTableTests.cs:line 762

I dug into Esent.Interop and found API.JetIndexRecordCount calls
API.Check on JetApi.JetIndexRecordCount.
JetApi.JetIndexRecordCount has the comment //-1 is allowed. I assume
this refers to the error code, not the number of records because
API.Check with throw an error if the error code is less than zero.
Tracking farther JetIndexRecordCount calls
NativeMethods.JetIndexRecordCount to get the count. and this appears
to call unmanaged code. (a dark corner of .net I have avoided until
now)
[DllImport(EsentDll, ExactSpelling = true)]
public static extern int JetIndexRecordCount(IntPtr sesid, IntPtr
tableid, out uint crec, uint crecMax);

Is this a problem that should be reported to the Esent project?
Could we update our fork of Esent to
public static void JetIndexRecordCount(JET_SESID sesid, JET_TABLEID
tableid, out int numRecords, int maxRecordsToCount)
        {
            if (0 == maxRecordsToCount)
            {
                // Older versions of esent (e.g. Windows XP) don't use
0 as an unlimited count,
                // instead they simply count zero records (which isn't
very useful). To make
                // sure this API works as advertised we will increase
the maximum record count.
                maxRecordsToCount = int.MaxValue;
            }

            var err = Impl.JetIndexRecordCount(sesid, tableid, out
numRecords, maxRecordsToCount);
            if(err != -1)
            {
                     Api.Check(err);
            }
        }
If so, do we just build through VS and update the sharedlibs of
associated projects? I didn't see any build scripts in the
Esent.Interop download.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" 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/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to