How does BerkeleyDB know when cached results from stat function are valid ?

Something curious: I have a berkeley database about 2G in size and a program that (1) opens the database, not DB_RDONLY; (2) calls stat(), without DB_FAST_STAT; (3) calls sync(); (4) calls close().
Running this program the first time takes a good amount of time in the stat() function - 20 minutes at least - and thrashes the disk all that time. So it's trawling the database to get record counts etc.
Running the program again takes only a few seconds so clearly the database is caching those stats and knows they're up to date - makes sense.
What's odd though is why the stats weren't known to be up to date on the first run. The database was actually copied from another box where the last thing to happen was a run of the same program. So it should have had up-to-date stats cached in it.
It's as if the cached values are somehow invalidated by moving the database to another machine. Why would that happen ? Where are the cached stats held and how does berekelyDB decide when they're up to date ?

I still cannot solve this problem, but I have some more observations:
1) yes it is a JApplet, and yes, the data streaming is performed in a separate thread.
2) Wireshark sniffing shows that data sent out by the PHP datasource on the server is sent immediately, and is not buffered (am using ob_start(), ob_flush() and flush() alls in the PHP script).
3) On Windows Vista, using Internet Explorer or Firefox, there is a constant 30 second delay before the Applet returns from this line: InputStream is = url.openStream();
4) After this 30 seconds, data appears in the Applet, but it can be seen also with java console debug prints that the data seems to be buffered. The newest data shown in the Applet is not the newest data sent to the client by the PHP datasource script.
5) On a SUSE Linux client, the Applet works as it should, there is no delay time in showing the data.
It appears as if there is on Windows a buffering of data which I do not wish to have and which does not occur on Linux. I need to find out how to get the URL openStream() call to return immediately allowing the initial data to be read and shown on the Applet. And I need to remove the buffering of data so that the data can be shown on the Applet when it arrives.
Can anyone help? Why does this work on Linux but not on Windows, and what can I do, at best within the Java code, to get the Applet to work on Windows as it does on Linux?
Thanks!
Steve, Denmark

Similar Messages

  • How do I get multiple return results from a function

    IDBASKET IDSTAGE DTSTAGE
    3 1 24-JAN-03
    3 5 25-JAN-03
    4 1 13-FEB-03
    4 5 13-FEB-03
    5 3 21-FEB-03
    I input is a single IDBASKET number from this table and this function works fine only if it has one IDSTAGE per idbasket. (idbasket#5)
    But how do I get it to return a result for an IDBASKET when it has multiple IDSTAGE? (idbasket#3 & 4)
    THANKS MUCH,
    MAT
    SQL> CREATE OR REPLACE FUNCTION status_desc_sf
    2 (p_code NUMBER)
    3 RETURN VARCHAR2
    4 IS
    5 lv_output_txt VARCHAR2(30);
    6 BEGIN
    7 IF p_code = 1 THEN lv_output_txt := 'Order submitted';
    8 ELSIF p_code = 2 THEN lv_output_txt := 'Accepted, sent to shipping';
    9 ELSIF p_code = 3 THEN lv_output_txt := 'Backordered';
    10 ELSIF p_code = 4 THEN lv_output_txt := 'Cancelled';
    11 ELSIF p_code = 5 THEN lv_output_txt := 'Shipped';
    12 ELSE lv_output_txt := 'No information';
    13 END IF;
    14 RETURN lv_output_txt;
    15 END;
    16 /

    Duplicate thread:
    How do I get multiple return results from a function

  • When sending iMessage, how does recipient know who it's from

    When you send a message through iMessage on iPad 2 wifi to an iPhone mobile number, how does the recipient know who the message is from as the iPad 2 wifi has no téléphone number... Does it show thé Apple ID?

    Try turning off iMessage and back on again. (Settings> Messages)
    This resolved it for me. It is an official apple solution -
    http://support.apple.com/kb/TS2755
    Best,
    Alex

  • How does Outlook know when you are typing in correct password

    What settings in Outlook/Exchange know what your password is when signing into Outlook.  In my environment computers are on a domain and use domain\username to sign in to Outlook. 

    Hi,
    As far as I know, we need to enter password for Exchange account if the authentication method is NTLM. And here is the process about the authentication process:
    1.Client sends NTLM Authentication Request to the server.
    2.Server sends a 64-bit NTLM challenge to the client.
    3.Client uses the challenge and an NTLM password hash to create an NTLM response.
    4.The client sends the NTLM response to the server.
    5.The server creates an NTLM response (since it also has your NTLM password hash) and compares its version with the one received by the client.
    6.If the responses match, the authentication is successful.
    If you have any question, please feel free to let me know.
    Best regards,
    Angela Shi
    TechNet Community Support

  • Does anyone know when the next generation of Minis are coming out?

    I was just wondering if anyone knew when the next gen of mac minis would be coming out and when the current gen were released?

    To answer your question there were two refreshes of the Mac mini in '09; the Early '09s came out in March and the Late '09s in October. The previous refresh was back in August of '07. The Late '09s doubled the RAM, increased the HDD size and have a faster CPU, all for the same price.
    The Mac mini server was also introduced in October with 2 HDDs, no optical drive and Mac OS X Server as the OS.
    There will probably not be another refresh anytime soon. Of course we also believed that last March!
    Dah•veed

  • How does Siri know where my office is

    Ok I just got my iPhone 4s and I can't work out how to get Siri to remind me to do something when I get to the office.
    How does Siri know when I'm at the office
    How does Siri know I'm at home
    How does Siri know I am at a particular place.
    I know how to get Siri to do a reminder by using time, but the adverts say "office" so how does it know
    Any help appreciated for a new 4s user :-)

    Put your office location in your contacts by itself with a label of office or work. Or associate it as office or work like you do with wife and kids and such.

  • Does anyone know when Aperture will support RAW files from the Canon Eos 7D mkii?

    Does anyone know when Aperture will support RAW files from the Canon Eos 7D mkii?

    Only Apple knows. The never announce upcoming RAW support in advance, sorry. And if anybody knew, it would not be allowed to post this information here.

  • Does anyone know when the Mac Pro switched from ATA to SATA DVD Drives

    Does anyone know when the Mac Pro switched from ATA to SATA DVD Drives ?
    I tried to find this answer online but failed.

    Appears the Mac Pro (Early 2008) is the last model to suggest Ultra ATA/100 optical.
    And with an optional card, use Serial Attached SCSI via Mac Pro Raid.
    This kind of information gets sketchy in that the hard drive bus and other parts are SATA
    and only this (and earlier) model Mac Pro has optical drive interface w/ Ultra ATA/100. The
    logic board on the early 2008 appears to have two Serial ATA ports, 3.0GBPS; so to check
    these, you may need to look into specification in iFixit.com repair guides, any takeapart
    guides, and note specifications in everymac.com and those from mactracker.ca.
    The MacPro after Early 2008 model build series (Early 2009) appears to sport an optical
    drive with 18x speed, compared to Early 2008 & before, whose drives indicate 16x spec.
    Other changes may be indicated by certain parts and differences; processors, graphic
    support, and those kinds of things. 2008 shows dual-core, afterward, quad-core.
    So on what little I found, that would appear to be the divide or when optical drive spec
    on the logic board changed from Ultra ATA/100 to SATA versions. But double check.
    Good luck & happy computing!

  • HT1476 How would I know when does the iPod touch completes charging?

    Since the iPod touch doesn't display a battery percentage, how would I know when the charging is completed? In iOS 6 and earlier there would be a plugged-in icon meaning that the device is charged, but in iOS 7 there is only one icon that can mean both charging or charged.

    Battery icons
    The battery indicator icon in the upper-right corner of the screen shows battery charging status and about how much charge is left in the battery. When connected to a power source, a small lightning icon will appear next to the battery icon:
    If the battery charge is very low, the device may display a black screen with an empty battery icon, indicating that the battery needs to charge for up to ten minutes before you can use the device. If the battery is extremely low on power, the device may display a black screen for up to two minutes before one of the low-battery images appears; continue to charge the unit for at least 30 minutes or until it is fully charged.
    Yes I already saw this article before and this doesn't help ansewering my question. For iOS 6 and earlier, there would be a lightning icon in the battery when it's charging. If it's charged then there would be a plugged-in icon in the battery. However, the lightnight icon besides the battery in iOS 7 stays the same all the time as long as it's plugged into the charger. So I have no idea when does it finishes its charging, as it doesn't even show battery percentage like iPhone does.

  • How does he know ? (pacman and package names)

    i take a package from pacman cache on box 1
    i rename it from say xorg-1.4.0.pkg.tar.gz to xorg14-1.4.0.pkg.tar.gz
    i pacman -U it on box 2
    pacman on box 2 : upgrading xorg ###############33
    how does he know its xorg and not xorg14 ? (there seem to be only the actual files of the application inside)
    how do i rename the package so that pacman really understands its xorg14 and not xorg ?

    several reasons
    i hate ignorepkgs (and the trouble they can make if some dependency escapes out of what you ignorepkg'd)
    i have multiple (varying between 5 - 9) boxes that run arch + 3 family / friends boxes with arch that i am the support guy for. when a bad or unexpected update was out (dhcpcd kde4 xorg lib/include/asm etc) it was bad for most or all of the boxes - so i want a solution for all at once
    i install from scratch a lot (i naturally have skill of breaking my system to irrecoverable state and with the recent updates of arch its even more cause i swap hard drives). i prefer to have a custom mirror on my usb flash drive
    i want to be able to give this mirror easily to others too - like that guy that made the kde 3 mirror

  • I have my credit card on my daughter's i pod and i needed it to set up the apple id how do i make it so she can't spend any of the money but still get free apps.? Also she has a$15 app card on there how do I know when she buys apps which payment it takes?

    I put my credit card on my daughters new i pod. How do I block her from buying apps but still being able to download free apps? Also she has a $15 app card on the i pod how do i know when she buys something whitch payment it will take the visa or app card? PLEASE HELP A.S.A.P. THANK YOU

    You can
    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    You can have apps purchased from more than one account. It does complicate update apps though.
    - Go to settings>Store and sign out and sign into your account.
    - Apps are locked to the account that purchased them.
    - To update apps you have to sign into the account that purchased the apps. If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account.

  • How do I know when my unlock has been processed?

    Hi all,
    Sorry for what's probably a dumb question, but I can't find an answer anywhere.
    I have an AT&T iPhone 4S, and I recently called them to request an unlock.  Since it was on a business account while under contract, they had to submit a request directly to Apple instead of just using the web form.  However, they told me that they never received anything from Apple during the process that would indicate that I'll be notified once the request has been approved.  So from my understanding, completing the process on my end involves tethering to iTunes and restoring the phone - but how will I know when it's actually time for me to do that? 
    I should add: I am no longer with AT&T, or in touch with anyone else who is still on the account that I had been part of.  So if anyone else on that old account gets notified, I won't know.  And since I'm not with AT&T myself, I feel doubtful that they'd let me know.
    Thanks for your help!

    Apple does Not Unlock phones... This is done by the Carrier.
    About Unlocking...
    http://support.apple.com/kb/HT5014
    Also See this  AT&T Unlock Eligibility

  • I am using a WD external hard drive for backing up my laptop with Time Machine, but I have to do it manually. How do I know when it has finished the back up? How long should it take?

    I am using an external WD hard drive for backing up my laptop. I have to do it manually, so I can't set Time Machine to just do it for me. How do I know when it is done backing up? How long should this take?

    Triple-click anywhere in the line below to select it:
    tmutil compare -E
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    The command will take at least a few minutes to run. Eventually some lines of output will appear below what you entered.
    Each line that begins with a plus sign (“+”) represents a file that has been added to the source volume since the last snapshot was taken. These files have not been backed up yet.
    Each line that begins with an exclamation point (“!”) represents a file that has changed on the source volume. These files have been backed up, but not in their present state.
    Each line that begins with a minus sign (“-“) represents a file that has been removed from the source volume.
    At the end of the output, you’ll get some lines like the following:
    Added:
    Removed:
    Changed:
    These lines show the total amount of data added, removed, or changed on the source(s) since the last snapshot.

  • A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)

    Hi guys
    i have problem when i run my windows application exe in windows server 2003
    it give me this exception error :
    I using sql server 2005
    visual studio 2008
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    ************** Exception Text **************
    System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
       at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
       at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
       at System.Data.SqlClient.TdsParserStateObject.ReadByte()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
       at Sales.SalesClass.ShowSalesData(String ConnectionString)
       at Sales.Form1.timer1_Tick(Object sender, EventArgs e)
       at System.Windows.Forms.Timer.OnTick(EventArgs e)
       at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Sales
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Documents%20and%20Settings/administrator.ALTAWIREADYMIX.000/Desktop/Sales.exe
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    System.Transactions
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    System.EnterpriseServices
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    For example:
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    Why this error show and how to solve it
    if possible help me
    Why this exception show and how to solve it.
    Notes this exception not close my application and not affect in result show but i don't know why it show

    The problem can be caused by certain issues of long-running queries, which are reported improperly. Try increasing the timeout:
    http://support.microsoft.com/en-us/kb/555938

  • How does oracle know the databse is inconsistent and needs recovery?

    Hello,
    How does Oracle know that the datafiles are inconsistent and db needs recovery when rebuilding the db off of the online/hot backups? Whereas, it doesn’t ask for recovery when rebuilding the database from cold backup (I understand that, for cold backup, database is shutdown immediate and hence the db is consistent). In both scenarios, a new control file is created (that means it won’t have SCN) and only datafile header will have the SCN. What’s that piece of info that oracle check to know if the database is consistent or inconsistent during the backup restore and recovery and where that info resides?
    Thank you for any hints and answers.
    Jay

    Oracle uses the datafiles to identify if they are consistent. If the datafiles backup was taken when the database was OPEN, they are marked as "fuzzy" in the header. Also, likely, the Checkpoint SCNs may be different if tablespace checkpoints (e.g. by ALTER TABLESPACE BEGIN BACKUP) are at different points in time.
    If the backup was a cold backup with the database shutdown normal/immediate, the headers are marked appropriately.
    When you run CREATE CONTROLFILE, it has to read the datafiles because the controlfile, itself, has no SCN and LogSequenceNumbers information.
    Hemant K Chitale

Maybe you are looking for

  • PC died. Need to put contents of ipod on new PC

    I had a PC laptop that my ipod classic was synced to. That laptop died and is not available.My ipod classic is fine but i need to transfer all its content to another PC so I can sync new content, (not purchased through itunes). Normally I transfer ed

  • Renaming a file on desktop = infinite beachball bug

    I have a late 2013 Macbook Pro 13''. Replicating the bug: 1. I am trying to rename files on the desktop (screenshots, long names). 2. I click on the file and press ENTER to allow renaming 3. I click at the end of the name to loose selection. Result:

  • Partial Syncing Issues

    I am having a problem with my iPhone 4s.  I can sync my music and my apps, but for some reason, it is not syncing my podcasts and movies anymore (it has worked in the past).  I have all the settings for syncing correct.  Can anyone help?

  • Download Standard Business Packages of MM,SD for IViews

    Hi Experts, I want to download the Standard Business Packages for MM, SD Etc Modules. So from where i can get this, such that i am able to use them in Portal. Pls help me out. Regards, DS

  • Locate link browser window using windows 7 outlook 2003

    I have been using windows 7 (64bit) along with outlook 2003 with no problem till today. All of a suddden everytime I click to open a link from within an outlook e-mail message  a "locate link browser window opens" I see lots of issues on the internet