Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
LockNotGrantedException is appeared
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Yuta Taki  
View profile  
 More options Feb 13 2012, 2:20 am
From: Yuta Taki <yt.t...@gmail.com>
Date: Sun, 12 Feb 2012 23:20:11 -0800 (PST)
Local: Mon, Feb 13 2012 2:20 am
Subject: LockNotGrantedException is appeared
Hello,

I'm writing a muti-thread InfiniteGraph interface, and I sometimes see
an exception "LockNotGrantedException."
As I understand it, a thread wait a few seconds (I specified in the
properties file, IG.SessionPool.ThreadBasedSessionPool.LockWaitTime)
when the transaction has already been locked.

Is my understanding is wrong?
Or does this come down to a timing issue?

best regards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Asher Moody-Davis  
View profile  
 More options Feb 13 2012, 9:31 am
From: Asher Moody-Davis <ash...@objectivity.com>
Date: Mon, 13 Feb 2012 06:31:39 -0800 (PST)
Local: Mon, Feb 13 2012 9:31 am
Subject: Re: LockNotGrantedException is appeared
Yuta,

You are correct.  You are allowed to have multiple read transactions
accessing the same data but if you want to write to data that is
already locked by another transaction you will need to wait.  If you
exceed the lock wait time you specified in your configuration file you
will received a LockNotGrantedException.  Read/write transactions lock
containers (not just a single object) in the graph so it is important
to use read/writes only when you need them.  If you can accomplish
most of your task in a read transaction then separate the reading and
writing portions.  If you receive the LockNotGrantedException you can
always create logic to retry your transaction again.  You also have
the option of using an infinite wait (-1) which will wait an unlimited
amount of time to access a resource.  The only issue with an infinite
lock wait is that you may run into a deadlock exception where two
threads are trying to access data in reverse order.

If locking is a major issue considered changing your container
configuration settings:

http://wiki.infinitegraph.com/w/index.php?title=Configuration_Referen...

If you limit the size of your containers you will lock smaller pieces
of the graph.  You will need to test out different values based on the
average size of your objects and how you access the graph.

Thanks,
Asher

InfiniteGraph Team

On Feb 12, 11:20 pm, Yuta Taki <yt.t...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yuta Taki  
View profile  
 More options Feb 13 2012, 9:40 pm
From: Yuta Taki <yt.t...@gmail.com>
Date: Mon, 13 Feb 2012 18:40:55 -0800 (PST)
Local: Mon, Feb 13 2012 9:40 pm
Subject: Re: LockNotGrantedException is appeared
Hello Asher,

Thank you for your helpful advice.

In our system, many write-access occures, therefore, I'll try to
control the LockWaitTime or separate the reading and writing portions.

Thank you,
Yuta

On 2月13日, 午後11:31, Asher Moody-Davis <ash...@objectivity.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »