DO4 tested versions: 4.3.5 build 6299 and 6420.

using (var transactionScope = Transaction.Open(transactionMode))
{
  using (var region = Validation.Disable())
  {
    int id = 1;
    Server server = Query.All<Server>().SingleOrDefault(server => server.Id == id);
    // THIS LINE THROWS EXCEPTION WHEN ENTITY 'Server' IS NOT REFERENCED
    if (server.IsReferenced())
    {
      ...
      // Do some work
    }
    transactionScope.Complete()
  }
}

This code trying to do some work when entity 'server' is not referenced. When entity is referenced (when IsReferenced() returns true) everythink is ok. But when entity is not referenced it throws such error :

Query task is not executed yet

with stack trace:

   at Xtensive.Storage.Internals.QueryTask.GetEnumerator() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Internals\QueryTask.cs:line 48
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Xtensive.Storage.RecordSetExtensions.<ToEntities>d__a.MoveNext() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\RecordSetExtensions.cs:line 84
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Xtensive.Storage.ReferenceFinder.<GetReferencesTo>d__0.MoveNext() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\ReferenceFinder.cs:line 71
   at Xtensive.Core.EnumerableExtensions.IsNullOrEmpty[TItem](IEnumerable`1 items) in c:\Temp\DataObjects.Net\Xtensive.Core\Xtensive.Core\Extensions\EnumerableExtensions.cs:line 46
   at Xtensive.Storage.ReferenceFinder.IsReferenced(Entity target) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\ReferenceFinder.cs:line 55

asked Oct 20 '10 at 15:21

Peter%20%C5%A0ulek's gravatar image

Peter Šulek
492313236


One Answer:

Most likely this is a bug. Issue 838 is created.

answered Oct 21 '10 at 02:29

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Is there any progress on this bug? It is stop-breaker for us on our new project built up on DO4 :-(

(Oct 25 '10 at 07:51) Peter Šulek Peter%20%C5%A0ulek's gravatar image

I hope we'll fix a set of important issues (including this one) during this week. We didn't study it yet, but it's included into the plan for this week.

(Oct 25 '10 at 13:54) Alex Yakunin Alex%20Yakunin's gravatar image
1

The issue is fixed.

(Nov 12 '10 at 07:53) Alex Yakunin Alex%20Yakunin's gravatar image

Oh lord, thanks god! In which build number will be this fix (and when) ?

(Nov 12 '10 at 09:54) Peter Šulek Peter%20%C5%A0ulek's gravatar image

Marked as fixed in rev. 6649, so any subsequent update (likely, we'll publish it on Tuesday) will contain it.

(Nov 12 '10 at 10:00) Alex Yakunin Alex%20Yakunin's gravatar image

Alex where i can found information about "fixed in rev." like informations about fixed bugs? I dont see such information in google code issue tracker. For example for this issue it says Status: Accepted, no other info that it is fixed and in which revision.

(Nov 12 '10 at 12:13) Peter Šulek Peter%20%C5%A0ulek's gravatar image

Bug seems to be fixed, thanks!

(Nov 18 '10 at 03:49) Peter Šulek Peter%20%C5%A0ulek's gravatar image

Alex where i can found information about "fixed in rev." like informations about fixed bugs?

We normally publish it with each update, but omitted this for 6649, sorry. We're focused on v4.4 (dev) now, v4.3 branch (stable) contains only bugfixes. So it's recommended to update to it, even if we don't provide details.

(Nov 22 '10 at 07:57) Alex Yakunin Alex%20Yakunin's gravatar image
1

Starting from v4.4 we'll resolve the issue with complete revision history. We'll either maintain a special file for this, or will switch to an issue tracker providing support for this (so far we didn't find an ideal solution here - e.g. we need to track fixes in branches independently, but taking merges into account).

(Nov 22 '10 at 07:57) Alex Yakunin Alex%20Yakunin's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA