Berkeley db lost data when using autocommit

I has written an app which uses berkeley db 4.5.20(libdb_cxx-4.5.so). There are serveral threads reading and writing the same db using autocommit. All the reading threads share one db handle and All writing threads have their own db handles. In reading threads, cursor and explicit transaction are used to retrieve data. In write thread, the db->put method is used to write data. In the app, the return value of put is checked to see whether success.
After serveral days running, the app definitely lost some data(there is a thread to dump the imcomming data to disk for comparison), and the return value of put method seems all ok. Can someone point out the possible reason or how to debug this from log files or something else?
The DBENV is opened with flags,
DB_INIT_TXN | DB_INIT_MPOOL |
DB_INIT_LOCK | DB_INIT_LOG |
DB_CREATE | DB_RECOVER |
DB_THREAD
The DB handle is opened with flags, DB_CREATE | DB_AUTO_COMMIT | DB_THREAD
thanks
Edited by: user13262865 on 2010-8-19 下午10:20
Edited by: user13262865 on 2010-8-19 下午10:28

Hi,
Thanks for your reply. Actually i got no hint from the link :). Today, i found the db->put method throw DB_RUNRECOVERY exception when a check point thread is on-going after the app runs about ten days. The check point thread stack is as follows,
Thread 12 (Thread 26744):
#0 0x000000368accc5f2 in select () from /lib64/libc.so.6
#1 0x00002b367aa29043 in __os_sleep ()
from /usr/local/BerkeleyDB.4.5/lib/libdb_cxx-4.5.so
#2 0x00002b367aa24090 in __memp_sync_int ()
from /usr/local/BerkeleyDB.4.5/lib/libdb_cxx-4.5.so
#3 0x00002b367aa2470e in __memp_sync ()
from /usr/local/BerkeleyDB.4.5/lib/libdb_cxx-4.5.so
#4 0x00002b367aa316aa in __txn_checkpoint ()
from /usr/local/BerkeleyDB.4.5/lib/libdb_cxx-4.5.so
#5 0x00002b367aa319f1 in __txn_checkpoint_pp ()
from /usr/local/BerkeleyDB.4.5/lib/libdb_cxx-4.5.so
#6 0x00002b367a965257 in DbEnv::txn_checkpoint(unsigned int, unsigned int, unsigne
d int) () from /usr/local/BerkeleyDB.4.5/lib/libdb_cxx-4.5.so
#7 0x0000000000437e1f in DBEnv::checkPoint (this=0x676ae0)
at ../source/DBEnv.cpp:46
#8 0x000000000043e436 in thread_check_point (arg=0x7fffcce2b6b0)
at ../source/ChkPointer.cpp:43
#9 0x000000368b806367 in start_thread () from /lib64/libpthread.so.0
#10 0x000000368acd30ad in clone () from /lib64/libc.so.6
My Berkeley version is db-4.5.20.NC
Edited by: user13262865 on 2010-8-31 上午4:50
Edited by: user13262865 on 2010-8-31 上午4:51

Similar Messages

  • How can forbid changing data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?

    I am using BAPI  'BAPI_MATERIAL_SAVEREPLICA' to creat material master data in batch.
    But this BAPI also can be used for change mode.
    How to forbid the change of MAT data when use this BAPI?
    TKS a lot~~
    I am looking foward to your response~~~

    you have to find out what the user did before your program goes ahead and starts the BAPI.

  • How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?

    I am using BAPI  'BAPI_MATERIAL_SAVEREPLICA' to creat material master data in batch.
    But this BAPI also can be used for change mode.
    How to forbid the change of MAT data when use this BAPI?
    TKS a lot~~
    I am looking foward to your response~~~
    Edited by: lorryhappy on Dec 22, 2009 11:35 AM

    Hi
    You can achieve it in another way..
    Before Passing Data to BAPI , Check whether the material is existing or not..
    If material is existing (Present in Material Master Tables e.g. MARA ) using
    data: l_matnr like mara-matnr.
    Select single matnr from mara into l_matnr.
    IF sy-subrc EQ 0.
    " Material is existing ==> Do Not Pass to BAPI
    else.
    " Material is NOT existing ==> Pass to BAPI for creation.
    endif.
    Repeat above logic for every material in batch..
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Does verizon selects collect data when using wifi ?

    When signing up for verizon selects is states it collects data when using wireless service but does it collect data when using home wifi which is not verizon?

    I'm not sure why one would want to participate in this program but if one is weary about it I for sure wouldn't use it.

  • When I connect to wi fi does my 3G automatically switch off. As I seem to be using a lot of my data when using wi fi at home

    When I connect to wi to, does 3G automatically switch off my iphone4s as I seem to be using a lot of data even when using wi fi at home ?? Thank you

    Hi,
    As far as I know, when you have a WiFi-connection all data will go through WiFi and therefor will NOT use your 3G data.
    Kind regards,
    Hugo

  • OTF end command // missing in OTF data when using CONVERT_OTF_2_PDF

    Hi
    When using the function module CONVERT_OTF_2_PDF I am getting the strange scenario that for some users it is giving the error message "<u><b>TD 030: OTF end command // missing in OTF data</b></u>". 
    I am executing this function module using the OTF output data received from a smartform executed with the parameter control-parameters-getotf = X and I am not formatting it in any way.
    any assistance in this is much appreciated.

    hi
    good
    go through this link,which ll give you detail idea about this function module
    http://www.jt77.com/development2/programming-07636.html
    thanks
    mrutyun^

  • JComboBox only show 10 items data when using DataBinding

    JComboBox only show 10 items data when binding to one table more then 10 lines. List Binding Mode is "Navigation Mode".
    JComboBox's property "maximaxRowCount" is seted to 30, but still display 10 items.
    some code:
    private JComboBox jComboBox2 = new JComboBox();
    jComboBox2.setModel((ComboBoxModel)panelBinding.bindUIControl("ChartView2", jComboBox2));
    ps. Table "Chart" has 35 lines.
    JDeveloper 10g(Version 10.1.2.0.0 Build 1811)

    I am encountering the same problem. I tested the binding VO in the Business Component Browser, it's fetching the correct result set.
    Any suggestion would be greatly appreciated!
    Stephanie

  • LOST DATA WHEN ARCHIVING

    Is there any way to protect my data when archiving? I am losing past events on my calendar because the "Save archive copy to PC" doesn't stay checked all the time when purging happens.
    Post relates to: Treo 755p (Sprint)

    The best way to preserve your data is to export the data in each category in Palm Desktop to a seperate folder on your PC.
    Create a new folder on your PC somewhere that is convenient. Name it something like Palm Desktop Data. Click on the link below and follow the instructions on that page for the export procedure.
    http://www.palm.com/cgi-bin/cso_kbURL.cgi?ID=28734
    Make sure you select all for the range in the export window.
    With the data saved in the folder you created, make a copy of that folder and save to a flash drive, cd-rw or external hard drive.
    Anytime you make a change in Palm Desktop, export the data that was changed to that folder and save again to the external media.
    With this process you can always import the data back into Palm Desktop anytime you have a problem with the data in Palm Desktop or if your computer/hard drive/device crashes.
    Post relates to: Palm i705

  • Discoverer 4i Plus returns no data when using views with db link references

    I am using Discoverer 41 Plus to view reports online.
    When I create a worksheet based on a view, that only references local tables, everything is OK and Disco plus shows the output OK.
    When I create a worksheet based on a view, that references a Database link, Disco plus gives me an "Query caused no data to be returned" error.
    Is this to be expected from Discoverer Plus?
    Thanks - Sue.

    I'm wondering if this has anything to do with the default position (and default aggregate) for the EUL folder item? I can see that some of the folders have number type items with default position 'Data Point' and others have these with default position of 'Top or Side'. I'm totally stabbing around in the dark here; looking at EUL folders which exhibit the problem and those which don't.
    I've tried changing one field to 'Data Point' and it hasn't helped. Will try changing the join items now I think.
    If anyone has any comments, would be v. grateful as I'm looking at dropping folders which have quite a bit of code around them and trying to re-create them exactly, which is a risky and horrible solution.

  • Control the Post Date  when use BAPI_OUTB_DELIVERY_CONFIRM_DEC to PGI !

    Dear all,
       How can I control the Post Date (WADAT_IST) when I use BAPI_OUTB_DELIVERY_CONFIRM_DEC to PGI?
    Thanks to help me.

    In ECC 6.0, I used this BAPI to perform the picking using this way:
    1. Implement enhancement point  BAPI_OUTB_DELIVERY_CONFIRM_D01 in enhancemnt spot ES_SAPLV50I to set the update picking flag on delivery control structure.
    GS_DLV_BAPI_CONTROL-UPDATE_PICKING = 'X'
    2. Implement enhancement of standard BADI SMOD_V50B0001. Use method EXIT_SAPLV50I_004 to loop at table CT_VBPOK and update the fields VBELN and POSNN with suitable values.
    There is one problem with this solution, though.  The delivery quantity cannot be updated.  Any increase in the delivery qty ITEM_DATA-DLV_QTY actually updates the picked quantity on the delivery.  Consequently, there is little practical use of this technique.
    John

  • Binding data when using xml data files

    Hello,
    I am pretty new to Flex4 and hope you hang on with my question. MAny thanks:
    I built an application first with PHP connection into a database which essentially listed IP of my company in a grid.
    One could filter the IP depending of technology, type of Ip and so on.
    When clicking in the grid, the details with many more fileds would apprear. This was working niceley as I had my services defined and needed only to drag services in the right place and add here and there some changes in the code
    Now, I wanted to do the same with an xml file instead of a mySQL database so to deploy it a little easier.
    I have the grid and the filtering working nicely.
    But I cannot create the data binding for the details.
    Below is the code. See the line before last where I tested if I could access to the  descriptipn fuield in my arrayCollection (coming from my xml)
    CAn anyone help me, please
    many thanks in advance and best regards
    Peter
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx"
       applicationComplete="myServ.send()" width="900" height="500">
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.events.ListEvent;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import spark.events.TextOperationEvent;
    [Bindable]
    private var myIPList:ArrayCollection;
    protected function myServ_faultHandler(event:FaultEvent):void
    Alert.show("Something went wrong", "Cannot load data");
    protected function myServ_resultHandler(event:ResultEvent):void
    if(event.result.test.IP is ArrayCollection){
    this.myIPList = event.result.test.IP as ArrayCollection;
    }else{
    var buffer:ArrayCollection = new ArrayCollection([event.result.test.IP]);
    this.myIPList = buffer;
    this.searchInput.enabled = false;
    this.searchInputTechnology.enabled = false;
    this.searchInputProvider.enabled = false;
    // serach for IP
    protected function searchInput_changeHandler(event:TextOperationEvent):void
    this.myIPList.filterFunction = filterFunc;
    this.myIPList.refresh();
    private function filterFunc(item:Object):Boolean
    if(String(item.IP).toLowerCase().indexOf(this.searchInput.text.toLowerCase()) > -1){
    return true;
    }else{
    return false;
    //  Search for Technology
    protected function searchInputTechnology_changeHandler(event:TextOperationEvent):void
    this.myIPList.filterFunction = filterFuncTechnology;
    this.myIPList.refresh();
    private function filterFuncTechnology(item:Object):Boolean
    if(String(item.Technology).toLowerCase().indexOf(this.searchInputTechnology.text.toLowerCa se()) > -1){
    return true;
    }else{
    return false;
    //  Search for Provider
    protected function searchInputProvider_changeHandler(event:TextOperationEvent):void
    this.myIPList.filterFunction = filterFuncProvider;
    this.myIPList.refresh();
    private function filterFuncProvider(item:Object):Boolean
    if(String(item.Provider).toLowerCase().indexOf(this.searchInputProvider.text.toLowerCase() ) > -1){
    return true;
    }else{
    return false;
    protected function myDG_changeHandler(event:ListEvent):void
    Alert.show("I Clicked. It should now be possible to see details, damned");
    ]]>
    </fx:Script>
    <fx:Declarations>
    <s:HTTPService id="myServ" url="IP.xml" fault="myServ_faultHandler(event)" result="myServ_resultHandler(event)"/>
    </fx:Declarations>
    <mx:DataGrid id="myDG" change="myDG_changeHandler(event)" x="37" y="134" width="814" height="159" dataProvider="{this.myIPList}">
    <mx:columns>
    <mx:DataGridColumn headerText="IP" dataField="IP"/>
    <mx:DataGridColumn headerText="short description" dataField="detail"/>
    <mx:DataGridColumn headerText="type" dataField="type"/>
    <mx:DataGridColumn headerText="Provider" dataField="Provider"/>
    <mx:DataGridColumn headerText="Technology" dataField="Technology"/>
    </mx:columns>
    </mx:DataGrid>
    <s:HGroup x="33" y="74" width="152" height="41" verticalAlign="middle">
    <mx:Spacer width="100%">
    </mx:Spacer>
    <s:Label text="IP"/>
    <s:TextInput id="searchInput" change="searchInput_changeHandler(event)" width="103"/>
    </s:HGroup>
    <s:HGroup x="686" y="74" width="153" height="41" verticalAlign="middle">
    <mx:Spacer width="100%">
    </mx:Spacer>
    <s:Label text="Technology"/>
    <s:TextInput id="searchInputTechnology" change="searchInputTechnology_changeHandler(event)" width="94"/>
    </s:HGroup>
    <s:HGroup x="519" y="74" width="153" height="41" verticalAlign="middle">
    <mx:Spacer width="100%">
    </mx:Spacer>
    <s:Label text="Provider"/>
    <s:TextInput id="searchInputProvider" change="searchInputProvider_changeHandler(event)" width="94"/>
    </s:HGroup>
    <s:Label x="135" y="38" text="IP Road Map" fontSize="29" color="#524E4E"/>
    <s:TextArea id="myText" x="37" y="315" width="204" text="{this.myIPList}" height="164"/>
    <mx:Image x="33" y="18" width="74" height="57" id="STLogo" source="file:/Users/peterhirt/Pictures/stlogo.png"/>
    </s:Application>
    Here at tzhe end I append one record out of the xml files I used
    <?xml version="1.0" encoding="utf-8" ?>
    <test>
        <IP>
            <IP>USB2 PHY</IP>
            <detail>single port </detail>
            <type>USB</type>
            <Provider>TR&amp;D</Provider>
            <Technology>65lp</Technology>
            <maturity_status>MAT20</maturity_status>
            <status_date>Q4/09</status_date>
            <next_Maturity>MAT30</next_Maturity>
            <next_Date></next_Date>
            <HED>y</HED>
            <HED_criticality>2</HED_criticality>
            <HED_MAT20_request>Q4/09</HED_MAT20_request>
            <CCI></CCI>
            <CCI_criticality></CCI_criticality>
            <_CCI_MAT20_request></_CCI_MAT20_request>
            <APG></APG>
            <APG_criticality></APG_criticality>
            <APG_MAT20_request></APG_MAT20_request>
            <STE></STE>
            <STE_criticality></STE_criticality>
            <STE_MAT20_request></STE_MAT20_request>
            <IMS></IMS>
            <IMS_criticality></IMS_criticality>
            <IMS_MAT20_request></IMS_MAT20_request>
        </IP>

    Hi Kevin,
    the current XML export version is admittedly not suitable for handling HTML data, as it doesn´t put any data inside CDATA sections.
    How can I strip out this HTML using the XML export?
    I´m not aware of this functionality, but I´m sure it would have to be integrated into the respective "includes" files in order to become effective.
    However, you might consider using the manual "converting database queries to XML" approach explained on this page: http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html -- this will give you notably more freedom to e.g. preprocess some data before it´s getting stuffed inside an XML node.
    I am pulling RSS feeds from news sites and storing the rss items in a database
    Would it be possible to rather sanitize the data before it´s getting stored in the database ?
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • How to show all data when using more than one parameter?

    Hi All,
    I used a query like this to show the data in a report:
    select col1, col2 // col1 and col2 are columns of tabale tab1
    from tab1
    where
    tab1.col1 =
    (case when :P_COL1 IS NOT NULL then // :P_COL1 IS A USER PARAMETER TO EQUAL COL1
    :P_COL1 ELSE tab1.col1
    end)
    AND TAB1.COL3 =
    (case when :P_COL3 IS NOT NULL then // :P_COL3 IS A USER PARAMETER TO EQUAL COL3
    :P_COL3 ELSE tab1.col3
    end)
    The problem is when I run the report with paramters values or not, It shows the data which is not null for both col1 and col3.
    That is when the value of col1 or col3 is null the report would not return that record!
    I want the report to show all data not only values which is not null!
    How to do this?

    Rainer,
    That where clause will fail when col1 in the table is null and the parameter has the dummy value. Consider the following:
    variable p_col1 varchar2
    exec :p_col1 := 'yourdummyvalue';
    select
    from
         select 'yourdummyvalue' col1 from dual
         union all
         select 'other' from dual
         union all
         select null from dual
         union all
         select 'X' from dual
    ) tab1
    where nvl(tab1.col1,'yourdummyvalue') = nvl(nvl(:p_col1,tab1.col1),'yourdummyvalue')In this case, the query returns the row with null and the row with 'yourdummyvalue', where only the row with 'yourdummyvalue' should be returned.
    You must do something like this:
    where ( :p_col1 is null or ( :p_col1 = tab1.col1 ) )That one is the simplest and does not need a dummy value. Here are some other more complicated examples:
    where nvl( :p_col1, 'yourdummyvalue' ) = decode( :p_col1, null, 'yourdummyvalue', tab1.col1 )or this:
    where nvl( :p_col1, 'yourdummyvalue' ) = nvl2( :p_col1, tab1.col1, 'yourdummyvalue' )In the last 2 cases, it will not matter if the dummy value exists in the data, but they are unnecessarily complex.
    Kurz

  • Character value changed to date when using desformat = SPREADSHEET

    I'm running reports on application server 10.1.2.0.2, and have a problem with formatting when printing to excel (desformat = SPREADSHEET). I have a character-field with the value 12.1, and when I print this, excel transforms it to 12.jan. Excel thinks this is a date-column. I have tried to add chr(39) on each side of the value, to force excel to print this value as character, but then it is displayed like this: '12.1'
    Does anyone have a similar problem? How can I force excel to display this as a character field with the value 12.1?
    Marit.

    Is there any suggestion for excel not to trim white spaces from string.
    ex "Day 1"
    "nbsp;nbsp; Data1"
    "nbsp;nbsp; Data2"
    while using spreadsheet formatting all the leading spaces are trimmed off.
    thanks
    senthil;

  • Lost data while using a car charger,

    i had a podcast -personal from a company- and i plugged it into the car charger and i had all sorts of problems with it, i used the original ipod cord with the usb car charger a/c adapter, i lost the data and is there any way of getting it back without going to my pc and putting it back onto it??? email me back the answer @ [email protected]

    *+is there any way of getting it back without going to my pc and putting it back onto it?*+
    No.
    Message was edited by: Jeff Bryan

  • Maintaining personal data when using Configurator to restore from backup.....

    Hi all
    I think I've got this right....and I hope someone has a solution.
    At my school we maintain a number of clusters of shared ipads, all supervised by Apple Configurator.  When I initially set them up, I created a 'master' ipad wiht folders, profile etc and then backed this one up and then restored from back-up to push this identical 'image' out to create identical iPads.  This has worked well.
    Over time we have added apps via Configurator, done updates etc.  New apps invariably get placed outside folders and things become untidy.  It kinds of defeats the purpose to then manually re-organise each device to place the apps into folders etc.  The logical thing (seems to be?) is to get one iPad set up wth the appropriate 'new' apps in new folders.....making all as it should be, then create a new back-up of this 'master' ipad and use the back-up to restore to all other ipads so that they reflect the apps being in the new folders all neat and tidy. 
    Trouble is, as soon as you restore from back-up, any personal data.......photos, documents, movies, etc gets wiped from the machine.  Not good in a school environment.
    So......have I gone down the wrong path.....is there another way I'm not aware of?  How are others managing this?  Have I got it totally wrong?
    Thanks
    Chris.

    Hi einnebcj,
    I hear you. I too am a mobile device administrator for a school district and encounter the same issues you are experiencing.
    I stopped doing folders on my "image." Instead am recommending and encouraging staff and students to use the Spotlight Search screen. When you have several dozen or 100+ apps, scrolling through screens and/or folders trying to find an app can be very time consuming. I am finding that students and staff are able to get to their app faster by searching with Spotlight. Just a quick drag to the right and start typing the first few letters of the app.
    Teaching users about the Spotlight Search screen is good for more than just finding apps. It'll also search contacts, email messages, photos, calendar events,  music, videos, notes, and more. Furthermore, it'll allow the user to select Safari and search the web. Spotlight is a very valuable tool that I think everyone should take advantage of.
    I know this isn't a direct answer to your question, but I hope it helps!
    ~Joe

Maybe you are looking for