Why not a read lock?

Hi,
I use dbsql operate the database, when i begin a transaction, followed by executing a query, by observing its lock and found it produced a write lock, instead of reading a lock?
Why is it? Do the following:
[root@iZ28aslsffdZ db_sql]# dbsql test.db
Berkeley DB 12c Release 1, library version 12.1.6.1.19: (June 10, 2014)
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
dbsql> create table t (a int);
dbsql> insert into t values (1),(2),(3);
dbsql> begin;
dbsql> select * from t where a = 1;
1
[root@iZ28aslsffdZ test.db-journal]# db_stat -CA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lock conflict matrix:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
80000014 dd= 0 locks held 1
write locks 1
pid/thread 30420/140133200996096 flags 0
priority 100  
80000014 WRITE    
3 HELD      
test.db:table00003 database  
0

That is expected behavior.  It is due to an internal optimization for single threaded access to the database.  The first time two threads clash trying to get access to the database schema table (which is what table00003 is), the database will stop getting a write lock on the table and will instead just get a read lock.
Lauren Foutz

Similar Messages

  • Trying to print e-mails using iCloud but can not add my printer Epson Stylus Photo PX810FW Why not?r

    Trying to print e-mails using iCloud but can not add my printer Epson Stylus Photo PX810FW
    Why not?

    Trying to print e-mails using iCloud but can not add my printer Epson Stylus Photo PX810FW
    Why not?

  • Hy rotation lock  is not checked, why not rotate?

    Hy rotation lock  is not checked, why not rotate?

    If you see a lock icon in the upper right corner of the screen - then the screen orientation is locked. I think that you are seeing that lock icon.
    Try the side switch above the volume rocker first and see if that unlocks the screen. If that doesn't do it, double tap the home button and swipe to the right and look for the lock icon all the way to the left. Unlock it there.
    If the screen is unlocked but still will not rotate, reset the iPad.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • Why not we lock these schemas instead of change the password

    The documentation mentioned that the following schemas belong to individual APPS base products. By default the password is the same as the SCHEMA name. Changing the password for these schemas does not affect any configuration files.
    ABM AHL AHM AK ALR AMF AMS AMV AMW
    AP AR ASF ASG ASL ASN ASO ASP AST AX AZ
    BEN BIC BIL BIM BIS BIV BIX BNE BOM BSC
    CCT CE CLN CN CRP CS CSC CSD CSE CSF CSI
    CSL CSM CSP CSR CSS CUA CUE CUF CUG CUI
    CUN CUP CUS CZ DDD DOM EAA EAM EC ECX
    EDR EGO ENG ENI EVM FA FEM FII FLM FPA
    FPT FRM FTE FUN FV GCS GL GMA GMD GME
    GMF GMI GML GMP GMS GR HR HRI HXC HXT
    IA IBA IBC IBE IBP IBU IBY ICX IEB IEC IEM IEO
    IES IEU IEX IGC IGF IGI IGS IGW IMC IMT INV
    IPA IPD ISC ITG IZU JA JE JG JL JTF JTM JTS LNS
    ME MFG MRP MSC MSD MSO MSR MST MWA
    OE OKB OKC OKE OKI OKL OKO OKR OKS OKX
    ONT OPI OSM OTA OZF OZP OZS PA PJI PJM PMI
    PN PO POA POM PON POS PRP PSA PSB PSP PV
    QA QOT QP QRM RG RHX RLA RLM SSP VEA
    VEH WIP WMS WPS WSH WSM XDO XDP XLA
    XLE XNB XNC XNI XNMXNP XNS XTR ZFA ZPB
    ZSA ZX
    If not affect any configuration files, why not we lock these schemas instead of change the password.

    These are the Schemas Shipped with E-Business Suite.
    In oracle EBS there is lot of inter dependency present between all schemas. For dependency pls check following link;
    http://etrm.oracle.com/pls/et1211d9/etrm_search.search
    Also go through below note id
    Best Practices for Securing the E-Business Suite [ID 189367.1]
    Regards,
    Nitin J.

  • I updated to ios5 on my iphone4 and all seems to be fine, except  I didn't get the camera icon on the locked screen. Why not?

    I updated my iphone 4 to ios5 and everything seems fine, except the camera icon isn't on my locked screen. Why not?

    I have been reading other discussions on this topic, and I think I found the answer. Thanks to all!!

  • I upgraded to ios5.  I have an iPhone 4.  I don't have the camera icon on the lock screen next to the unlock slide.  Why not?

    I have an iPhone 4.  I upgraded to ios5.  I don't have the camera icon on the lock screen next to the unlock slide.  Why not?

    Probably because you haven't double-clicked the home button.

  • Question on why LockMode.READ_UNCOMMITTED is waiting on read locks

    Running je-5.0.103
    We are running some load tests with multiple threads accessing our BDB. When we take a thread dump in the middle of the test we have noticed several of the threads waiting on a ReadLock even though we are using LockMode.READ_UNCOMMITTED.
    The javadoc for LockMode states:
    "With one exception, a record lock is always acquired when a record is read or written, and a cursor will always hold the lock as long as it is
    positioned on the record.  The exception is when {@link #READ_UNCOMMITTED} is specified, which allows a record to be read without any locking."
    Our load test is performing only reads and there should be no writes happening at all.
    So the question is why are still acquiring read locks?  Is there some other configuration setting that we have that would override this or is the lock that we see in the thread dump a different lock?
    Here is a sample thread waiting for a lock.
    "EJB default - 126" prio=10 tid=0x00007f730c05f800 nid=0x5378 waiting on condition [0x00007f72af8c1000]
       java.lang.Thread.State: WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x00007f75568b4238> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
            at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:964)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1282)
            at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:731)
            at com.sleepycat.je.latch.SharedLatch.acquireShared(SharedLatch.java:149)
            at com.sleepycat.je.tree.IN.latchShared(IN.java:497)
            at com.sleepycat.je.tree.Tree.getRootINRootAlreadyLatched(Tree.java:2105)
            at com.sleepycat.je.tree.Tree.getRootINInternal(Tree.java:2087)
            at com.sleepycat.je.tree.Tree.getRootIN(Tree.java:2069)
            at com.sleepycat.je.tree.Tree.search(Tree.java:1237)
            at com.sleepycat.je.dbi.CursorImpl.searchAndPosition(CursorImpl.java:2118)
            at com.sleepycat.je.Cursor.searchInternal(Cursor.java:2822)
            at com.sleepycat.je.Cursor.searchAllowPhantoms(Cursor.java:2732)
            at com.sleepycat.je.Cursor.searchNoDups(Cursor.java:2586)
            at com.sleepycat.je.Cursor.dupsGetSearchKey(Cursor.java:3714)
            at com.sleepycat.je.Cursor.searchHandleDups(Cursor.java:3684)
            at com.sleepycat.je.Cursor.search(Cursor.java:2551)
            - locked <0x00007f74d7801d88> (a com.sleepycat.je.Cursor)
            at com.sleepycat.je.Database.get(Database.java:1294)
            at com.farecompare.atpcore.storageenginemodule.impl.berkeleydb.components.AtpRecordStore.getRecordsNoCursor(AtpRecordStore.java:215)
    Our code snippet making the call:
    private List<ATPRecord> getRecordsNoCursor( String key, Class<? extends ATPRecord> recordInterface ) throws StorageEngineException {
    DatabaseEntry theKey = makeKey( key );
    DatabaseEntry foundData = new DatabaseEntry();
    List<ATPRecord> records = null;
    OperationStatus retVal = getDatabase().get( null, theKey, foundData, LockMode.READ_UNCOMMITTED );   <<<<<< waits here
    if ( retVal == OperationStatus.SUCCESS ) {
    records = convertToRecordList( foundData.getData(), recordInterface );
    else {
    records = createRecordList( recordInterface, 0 );
    return records;
    Thanks,
    Chris Stillwell

    The call to IN.latchShared you're seeing is not a record lock, it's an internal latch on a Btree node.  Latching is not related to the lock mode.  This latch should be held for a short time, but in cases where many threads access the same records (or a very small set of records), you will see waiting on latches.  You can't disable latching -- thread safety requires it.
    --mark

  • Icloud is not backing up daily automatically on my phone or ipad I have to select back up now each day manually why is it not doing when locked on wifi

    Icloud is not backing up daily automatically on my phone or ipad I have to select back up now each day manually why is it not doing when locked on wifi

    Make sure your devices are also connected to external power or the wifi will disconnect after a few seconds.  If they are and they still won't back up, it may be caused by a corrupt existing backup that needs to be deleted, or by data on your device that is causing the backup to fail.  To troubleshoot these, try deleting your last iCloud backup (if you have one) by turning off iCloud Backup in Settings>iCloud>Storage & Backup, then tap Manage Storage, tap your device under Backups, then tap Delete Backup.  Then go back and turn iCloud Backup back on and try backing up again.
    If it still won't back up, you may have an app or something in your camera roll that is causing the backup to fail.  To locate which one, go to Settings>iCloud>Storage & Backup>Manage Storage, tap the name of your device under Backups, under Backup Options tap Show All Apps, then turn them all to Off (including camera roll) and try backing up again.  If the backup is successful, then the camera roll and/or one of your apps is causing the backup to fail and you'll have to located by process of elimination. Turn the camera roll On and try backing up again.  If it succeeds, turn some of your apps to On and try backing up again.  If it succeeds again, turn some more apps to On then try again; repeat this process until it fails.  Eventually you'll be able to locate the problem app and exclude it from your backup.

  • Why do I get the Application Error jqsnotify.exe-Application Error. The memory could not be read?

    Why do I get this error message every time i opened up Firefox saying: jqsnotify.exe-Application Error and then at the bottom line it says: The instruction at "0x5ff3d322"referenced memory at " 0xe41203c3". The memory could not be "read". Click on OK to terminate the program.
    == This happened ==
    Every time Firefox opened
    == I recently renewed and installed the CA Security Suite and un-installed Firefox and re-installed it again.

    System restore did it for me........!!!! It's gone and I don't miss it one bit.....!!!! May be one of those untraceable tricks that hackers use to irritate people.....Some security programs can identify these things ,but the perps usually use bogus addresses to send them anyway...Cyber criminals SUCK....<u>That is right ,I said that....</u> and they should be jailed and fined and suspended from internet usage all over the globe....
    Reverend K.
    CEO,FOUNDER,Site Editor,
    http://WWW.CCCINTL.NET

  • When I start firefox, i get this message ( The instruction at "0x7b9c77a9" referenced memory at "0x7b9c77a9". The memory could not be "read" ) hs anyone any idea why? I have scanned with AVG and something simply called 'Trojan Remover' and they both fin

    when I start firefox, i get this message ( The instruction at "0x7b9c77a9" referenced memory at "0x7b9c77a9". The memory could not be "read" ) hs anyone any idea why? I have scanned with AVG and something simply called 'Trojan Remover' and they both find nothing.... any advice would be greatly welcomed.. thanks
    == This happened ==
    Every time Firefox opened
    == this morning 22/07/10

    Lyall,
    I have seen this before, a long time ago (several years), and I cannot
    remember how/if we resolved it.
    If this is an impotant issue to you, I suggest that you open a case with
    BEA support.
    Regards,
    Peter.
    Got a Question? Ask BEA at http://askbea.bea.com
    The views expressed in this posting are solely those of the author, and BEA
    Systems, Inc. does not endorse any of these views.
    BEA Systems, Inc. is not responsible for the accuracy or completeness of
    the
    information provided
    and assumes no duty to correct, expand upon, delete or update any of the
    information contained in this posting.
    Lyall Pearce wrote:
    The title says it all really.
    I see other posts getting replies.
    This is a rather important issue, I have seen another post with a similar problem.
    While not being a show-stopper it certainly raises concerns.
    The application works ok until the application exits (in both development and
    executable form)
    Apparently this did not happen with Tux 7.1
    It does with 8, I do not have 7.1 so I have no workaround.
    ..Lyall

  • HT4101 can you tell me why my 64gb sanddisk card can not be read by my ipad ?

    can you tell me why my 64gb sanddisk card can not be read by my ipad ?

    I assume that it's an SD card of some sort ? If it's an SDXC card then how is it formatted - from the page that you posted from :
    Here are the supported SD cards and image-transfer protocols:
    Picture Transfer Protocol (PTP)
    Mass Storage Device protocol
    SDSC
    SDHC
    miniSD
    microSD
    MMC
    SDXC (supported only when not formatted as ExFAT)
    If it's not formatted as ExFAT then how did the photos get onto the card ? If you copied them onto it yourself then you need to create a DCIM directory off the root of the card, with the photos underneath it, and the photo filenames need to be exactly 8 characters long (no spaces) plus the file extension i.e. in a similar format as if a camera had created/written them

  • The beta page and Test Pilot page come up EVERY time I use Firefox. Same information so why not allow us to bypass it after the 1st or 2nd or 3rd reading?

    The beta page and Test Pilot page come up EVERY time I use Firefox. Same information so why not allow us to bypass it after the 1st or 2nd or 3rd reading?

    That is not normal behaviour, for possible causes see [[Firefox has just updated tab shows each time you start Firefox]].

  • Why am I getting this error message when I try to import? "The following files were not imported because they could not be read. (645)" I can see them :(

    Why am I getting this error message when I try to import? "The following files were not imported because they could not be read. (645)" I can see them
    Is was working this morning!

    Depends on your operating system
    Go to google, try typing in
    Change permissions Windows
    or
    Change permissions Mac

  • I can not open my lock why?how can i solve it.

    I CAN NOT OPEN THE LOCK OF IPHONE 4 ? HOW CAN I SOLVEIT?

    Please re-phrase the question or post in your native language.

  • Adobe Reader X won't print all pages supposed to; Why Not?

    Adobe Reader X won't print all pages supposed to; Why Not?

    Similar situation here.  Have multiple users getting hung up after the progress bar for printing appears.
    If forced to quit, prints do eventually appear sometimes.  Here's my app event error:
    (System is XP 32bit, direct connect via USB printer)

Maybe you are looking for

  • HELP!! asa 5505 8.4(5) problem with port forwarding-smtp

    Hi I am having a big problem with port forwarding on my asa. I am trying to forward smtp through the asa  to my mail server. my mail server ip is 10.0.0.2 and my outside interface is 80.80.80.80 , the ASA is setup with pppoe (I get internet access no

  • Cannot print to USB HP Color LaserJet 3600N on Vista SP2

    I had this printer setup and working fine until I nuked my laptop and reinstalled Vista Ultimate with SP2.  When I connect the USB, the laptop connects as it makes the noise that it's connected.  The printer shows online.  I went through the wizard o

  • How to handle the more than once from the same jsp files

    Hi, i have a one jsp file with three buttons.each one having for different functionalities. like one for cancel, second for edit the values and third for save the values in databse. so i want to handle all these 3 buttons. how can test that which but

  • Very Basic Question on Threads and Object Manipulation between classes

    I have a feeling this is on the virge of being a stupid question but hey, its the right forum. Lets assume I have a class that extends Jframe : Jframe1 In that frame there is only one Jlabel : Jlabel1 I want to create a thread that will affect Jlabel

  • OSB 11g Configuration

    Hi, I am trying to install Oracle Service Bus 11g, the installation went successfully, but when trying to configure the WebLogic (10.3.2) Domain and selecting (Oracle Service Bus Extension - all domain Technologies 11.1.1.3[Oracle_OSB]) from the doma