Out of order in tpdequeue

We have an application that has a sequentiality constraint. It seems that when
we do to tpenqueues within a single transaction, the single process that does
the tpdequeue sometimes gets the messages in a different order than they were
actually dequeued. Consider the following pseudo code snippet:
tpbegin();
tpenqueue(someqspace, someque,message1);
tpenqueue(thesameqspace, thesameque,message2);
tpcommit();
Can we always expect message1 to be dequeued before message2. assuming that there
is only one process dequeueing from the queue? If not, why not?
TIA...

Apologies - addition below to point 2
"Aviral" <[email protected]> wrote:
>
Scott,
The queue is a FIFO queue. The verbose output of the queue is as below:
Queue QRouterS: 0 Persistent Messages using 0 pages.
0 Nonpersistent Messages using 0 bytes.
0 Messages in total using 0 bytes.
Queue order: fifo
Out of order: none
Retries: 100
Delay: 0
Default delivery policy: persist
Default expiration time: none
Threshold Triggers:
Persistent: 0 - 80 %, Command: null
Non-persistent: 0 - 100 %, Command:
Some other points:
1) There are multiple processes writing to the queue all the time
2) There are only two processes writing multiple messages to this queue
at the same time within a transaction.
3) There is a tmqforward (specially written) on the queue which is peeking
at
the queue and if it finds something, dequeues the message after starting
the transaction.
4) Emperical data suggests that about 80% of the time the messages (in
case of
2 in a transaction) are being read in the reverse order.
5) We do not set birth times.
We are unable to duplicate this behaviour in developement.
Thank you very much in advance for any direction you can point us in.
Regards,
Aviral.
Scott Orshan <[email protected]> wrote:
If you have a FIFO queue, and do not set birth times, the messages should
come out
in order. You would need to post the queue creation script, as wellas
some of the
code you are using to dequeue the messages.
Are you dequeuing within a transaction as well? After the enqueues,can
you list
the queue and see the messages in the correct order?
     Scott Orshan
Alex Wolfson wrote:
We have an application that has a sequentiality constraint. It seemsthat when
we do to tpenqueues within a single transaction, the single processthat does
the tpdequeue sometimes gets the messages in a different order thanthey were
actually dequeued. Consider the following pseudo code snippet:
tpbegin();
tpenqueue(someqspace, someque,message1);
tpenqueue(thesameqspace, thesameque,message2);
tpcommit();
Can we always expect message1 to be dequeued before message2. assumingthat there
is only one process dequeueing from the queue? If not, why not?
TIA...

Similar Messages

  • Data written to socket getting lost?  or perhaps out of order?

    I'm trying to fix a bug in Flashmog. The bug is described in more detail here.
    Basically what is happening is that my Flash client claims that it is calling functions that don't arrive at the server -- or they arrive, but the socket data is out of order and therefore is garbled.  I've stared at the source code for hours and tried a lot of trial-and-error type stuff and added trace statements to see if I can find the problem and I'm not having any luck.
    In particular, there's class I have called RPCSocket that extends the AS3 Socket class so I can serialize data structures before sending them across a socket.  At one point, this RPCSocket class calls super.writeBytes and super.Flush.  It is the point at which I send all data out of my client. The data is binary data in AMF3 format.
              public function executeRPC(serviceName:String, methodName:String, methodParams:Array):void {
                   if (!this.connected) {
                        log.write('RPCSocket.executeRPC failed. ' + methodName + ' attempted on service ' + serviceName + ' while not connected', Log.HIGH);
                        throw new Error('RPCSocket.executeRPC failed. ' + methodName + ' attempted on service ' + serviceName + ' while not connected.');
                        return;
                   var rpc:Array = new Array();
                   rpc[0] = serviceName;
                   rpc[1] = methodName;
                   rpc[2] = methodParams;
                   var serializedRPC:ByteArray = serialize(rpc);
                   if (!serializedRPC) {
                        log.write('RPCSocket.executeRPC failed.  Serialization failed for method ' + methodName + ' on service ' + serviceName, Log.HIGH);
                        dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, 'RPCSocket.executeRPC failed.  Serialization failed for method ' + methodName + ' on service ' + serviceName));
                   super.writeUnsignedInt(serializedRPC.length);
                   super.writeBytes(serializedRPC);
                   super.flush();
              } // executeRPC
    Can someone recommend a way for me to store without corruption, conversion, or filtering or translation of any kind *all* of the information sent across this socket? I'd like to write it to a file.  I'm guessing that keep a global ByteArray var and storing the info there might work, but I'm wondering how I might get the contents of that ByteArray into a file so I can inspect it.
    Also, I'm wondering if I might be able to inspect what flash actually sends out on the socket?  I have a sneaking suspicion that data I supply to super.writeBytes may be sent out of order or may not actually get sent across the socket.  This bug I'm talking about only seems to happen under high-stress situations when I'm sending dozens of messages per second across this one socket.

    oops...forgot link to bug description: http://flashmog.net/community/viewtopic.php?f=5&t=549

  • Photos syncing from folder to iPhone all out of order?

    I have 2 folders synced to my iPhone 4 photo app.
    They were previous camera rolls before I set up my phone as a new device. They are all named in order and taken in order, for example IMG_001.jpg was my first picture in my old camera roll. IMG_822.jpg was the last photo taken before I did the backup, and is the last in the folder.
    The folder I am syncing from on my windows computer displays all of the pictures by filename (and because of that, by date) but when syncing with iTunes they end up on the phone ALL out of order. I can't find any rhyme or reason to how they are displaying. Most of the earlier photos show up at the beginning like they should, and the last at the bottom of the scroll appear to be mostly right, but then it's completely random from there.
    I've tried unsyncing them, removing them, and then adding them back again and nothing seems to work. I've even tried renaming the IMG_xxx numbers to different things and they still appear to sync in the same random order.
    Am I doing something wrong, or is this a huge bug for someone with OCD like me? lol

    This is highly annoying.
    I have probably 15-20 Smart Albums in iPhoto 8.1.2 in OS10.6.4 that are syncing to iOS4.0
    On the old software, my Smart Albums for photos would show up AS the smart albums I created. Now they show up in the iPhone one giant mess called "Photo Library".
    I can view photos broken up under "Events" on the iPhone by specific dates, but the dates don't tell me what the name of the event was, and some Smart Albums had multiple dates grouped together in one Smart Album and I don't really want them broken out separately by date. I want them organized how I organized them...
    In short, I want my photos grouped the way I have explicitly grouped them. It used to work, it doesn't now.
    Since iOS4.0 I am also getting sync errors all the time in iTunes. "iPhone cannot be synced because the required file cannot be found." WHICH FILE??? tell me and I will delete it...
    I've rebuilt the entire database in iPhoto (took 4 hours). I've scanned iTunes and removed all broken links and duplicate files. I've scanned the hard drive with the disk tool. I've emptied the iPhone and reinstalled iOS4 on it 5 times. I've turned syncing off for all non-essential applications and stuff I don't actually sync like voice memos. Same problem.
    I think I want my iOS 3 back. I don't really like multitasking anyway, always having to turn off applications for the one or two times in a million where task switching if helpful...
    Ugh....

  • The music I sync into my iPod touch is all literally out of order and in the library it's not. Why is this?

    I checked the starting time for songs in the library and on my iPod and they all say 0:00. What I mean when I say it's out of order is for example, the first ten seconds are skipped and placed somewhere in the middle of the song and some other parts are skipped then played later. I didn't have this problem before I updated iTunes for my new iPod, now when I tried syncing onto my old iPod as well, the same thing happens. So there's nothing wrong with my iPod. I want to know how I can fix this on iTunes or if it's just a glitch on my iTunes?

    Something you can try is resetting it all Settings > General > Reset > Reset all settings. Or go to Settings > Store &amp; sign out &amp; log back in. Another thing you can do is restore your ipod. This has happened to me but the only thing i did was that i created a new account but try doing the things above i just told you. :)

  • Video and audio not sync when i play all forms of video. from music videos, to tv shows. but they play perfect on my iPod. and tv shows display out of order on iPod, but in correct order on iTunes/computer. I even ran a virus check just to make sure.

    audio and video do not syncronize.  all forms of videos. music videos to tv shows.  what do i need to do the syncronize them again
    they are in sync on iPod, but not on computer.
    another issue that might be from the same cause is, the order of episodes of the tv shows i have downloaded,   they appear in order on computer, but on iPod they show out of order.
    any tips on how to fix this would very much help.
    thank you.

    Welcome to Apple Discussions!
    An old version of iTunes will cause this and mess up the videos on your iPod. Always make sure you always use an up-to-date version of iTunes.
    Make sure all the software on your computer is up to date...
    iTunes
    iPod Updater
    Updating iPod's Software
    You will then need to restore the iPod and then let iTunes update your iPod and put your music, videos, etc. back onto your iPod...
    Restore the iPod
    btabz

  • Opening and closing stock with sales order and with out sales order

    hello,
    any body please help me my client want to check opening stock and and closing stock in areport.
    material contains batch and some material with sales order and some are with out sales order. my client is asking this in a single layout. please tell me isthere any teport or bapi or function module to get this report.
    this is very uregent. and layout is requesting like opening stock, production stock, sales stock and closing stock.
    please guide me to get this report.
    Thanks & Regads
    Bhakta

    Transaction MB5B
    For sales order related use specila stock as E and use radio button indicator in stock type
    For stock w/o sales order, use special stock indiactor as "space' and stock type valuated stock.
    to get a perticular month,opening stock/closing stock enter the start date/end date as month start and end date.
    See the o/p which will give the stock as required by you

  • Keys out of order -- follow up to earlier post

    I ran the install disc Disc Utility Test and the Hardware Test disc on the computer since I posted my first question earlier tonight "Computer won't finish start-up -- any suggestions". The Hardware Test came back fine. The Disc Utility test on the install disc says: Keys out of order. It does not, however, explain how to repair this problem on the hard drive.
    Is there any way to fix this problem on the hard drive?
    Power Mac G4 Quicksilver   Mac OS X (10.3.9)  

    Invest in DiskWarrior. I had the same problem and DiskWarrior fixed it. No other utility programs worked for this problem. DiskWarrior is very inexpensive. Ordered online in the afternoon. It was delivered to my office the NEXT morning.

  • Camera roll pictures are out of order after upgrading to iOS 8.1

    It's nice that iOS 8.1 brings camera roll back. However, pictures are out of chronological order. I'm using iPhone 5s. I upgraded iOS from 8.0.2 to 8.1, and noticed this issue.

    That's weird cause my videos are all interspersed with everything else like they used to be, which unfortunately means it's inconsistently screwing up too.  My pics start with 2007 (first year i got an iphone) then run up to about 2014 vaguely in order, then back to 2013 where everything's all out of order, then down to 2012 again (also out of order), then 2011, 2010, 2009 etc like it's running backwards to 2007.  Then once it hits 2007 again, it jumps to this past july.
    SO aggravating!

  • Is there a way to reorganize out-of-order tracks in iTunes 11?

    Hello all--
    In iTunes 10, if an album appeared with the track numbers out of order, I could just click on the track number tab within each individual album and the tracks would be resorted by track number. In iTunes 11, I can't find a way to do the same thing. For example, I imported an album and now it starts out with track 4, then goes to 15, etc., but can't get them to sort sequentially. Any help would be greatly appreciated.
    I tried looking at one out-of-order album in the "songs" view, based on a similar question, but every time I try to search for the album under "songs" iTunes shows the result under "albums".

    here is a link to macosxhints.com that tells you how to output all of your feed URLs to a terminal window. from there you can cut and paste them into your new feed reader of choice...
    http://www.macosxhints.com/article.php?story=20080319094830396
    and if you are in the marked for a new reader may i suggest David Watanabe's excellent NewsFire. he had just recently made it totally free as a gift to the macintosh community.
    best of luck.

  • Chapter marker thumbnails getting duplicated, out of order (FCPX 10.1.4)

    Group - I use FCPX to compile home movies of my kids, the pets, etc. I use footage from a Canon HD camcorder and an iPhone 6+. I import them into FCPX, trim, transition, maybe throw in some music, and usually put in 40 or so stills (JPEGS) at the end for a slide show.
    The project I'm working on now is around 2.5h long after editing and transitions. I put chapter markers at the beginning of each scene, and then drag the pin to set a custom chapter marker thumbnail.
    The issue - no matter what I do, I can't seem to get ALL of the thumbnails sorted properly. Meaning, I get one or two out of order, and numerous ones duplicate. I've rebooted, trashed prefs (opt-com start), copied all the clips into a new project and re-rendered, and even deleted them all and manually applied them all again. There are roughly 36 or 37 chapters in this project. I tend to get a different result each time, but with the same general problem.
    Sadly, iMovie worked pretty flawlessly for me, but I thought I'd enjoy the added capabilities of FCPX. The rendering time for this movie on a one year old iMac with 24GB RAM is around 7 hours at 720p, so as you can imagine, it's not been a fun project. I've attached a screenshot of the issue on my AppleTV for reference. I've seen a lot of history with this problem, though many threads proclaimed it 'solved'. I'd disagree. Anyone have any thoughts on what I am doing wrong, or is this just more stellar quality control from Apple?
    PS - Are there any recommended alternatives to FCPX? I'm noticing I use fewer and fewer Apple-branded apps, I'm starting to see a pattern here.... :^(

    Russ H wrote:
    …. Later I'll take a look.
    Discs are not my top-priority here, but I remember this rules (for iDVD):
    The Rules of Chapter Markers:
    *Make sure no chapter markers are within two seconds of the start or end of the timeline.
    *Make sure no chapter markers are within a transition.
    *Make sure no chapter markers are within two seconds of the end of a transition.
    *Make sure you do not have the "Share selected Clips" option checked when preparing to share to iDVD
    maybe, these rules were not by limitations of software, but by 'standard'?
    If you test it, try to what happens when you 'violate' these rules ...........

  • After syncing Pc-Ipad my Photo's are out of order. In the folders they don't follow the Date-order. I use Itunes 10.6.1.7 and Ipad 5.1. The Problem is the same with XP and Windows 7.

    After syncing PC-Ipad my Photo's on Ipad2 are out of order. In the Folders/Albums the Photo's are no longer in the order of (EXIF) dates. I have updated Itunes to 10.6.1.7 and IPad2 to 5.1. I have reset the IPad2. I cleaned the Photo-cache and removed Itunes and Installed again. I tried it with Windows 7 (64) and XP, makes no difference. I tried it with one Album, Photo's also out of order. It doesn't seem to happen with my Ipad1 older software version. I there a bug in the newest software? Thanks for Help!
    Rudy from the Netherlands.

    problem solved after updating itunes to 10.6.3

  • Photos synch out of order

    Photos from some of my albums synch out of order when I upload them. How can I prevent this or else how can I fix the order on the iPod? The photos are numbered and should have stayed in order. (Most albums loaded in order - a few didn't.)

    I had the same problem when I converted a Power Point to .jpg files. Each slide was given a number 1, 2, 3, . . . 10, 11, 12, . . .
    The problem is that the iPod reads the numbers and shows the photos "alphabetically" so the order ends up being 1, 10, 11, 12, . . . 2, 20, . . .
    You need to renumber or rename each photo either so they're 01, 02, 03, . . . or a, b, c, . . .

  • IPod playlists out of order

    In iTunes, all the songs on a CD are still in the correct order and list the track numbers.
    But on my iPod, some albums are out of order. I checked and the iPod is not on shuffle in any way. I just browse to the artist and album, but the songs aren't even listed in the correct order.
    I restored the iPod but that did not fix the problem.
    What can I do to fix this problem?
    Dell Inspiron 600m   Windows XP Pro  

    well I figured out what the problem was. some tracks of the album had "Album Artist" or "Composer" listed, and the iPod was sorting those first. Pretty lame, but I'm glad I figured it out.

  • My music is organized on my computer but the songs under the albums are out of order on my ipod, they weren't before, i've restored, still out of order. what do i do to get them in order?

    My music is organized on my computer but the songs under the albums are out of order on my ipod, they weren't before, i've restored, still out of order. what do i do to get them in order?

    Have you tried creating a playlist for your album, then
    select the playlist in iTunes.
    right-click the playlist name -> select +copy to play order+. -> sync.

  • I have an iMac mid 2010. After Disk utilities said the drive was corrupt, I ran the hardware test (extended) 3 times. No problems. I than ran Disk utility again and got 2 messages in red-keys out of order, and --Volume corrupt, can't be repaired.  I tried

    I have an iMac mid 2010. After Disk utilities said the drive was corrupt, I ran the hardware test (extended) 3 times. No problems. I than ran Disk utility again and got 2 messages in red…keys out of order, and ……Volume corrupt, can't be repaired.
    I tried to do a system install, but message said…disk can't be changed. Will a complete erase and install fix this ?
    Everything is backed-up.

    There's hardware and software.
    Your drive could physically be in good condition but something has caused the file structure to be messed up (it just happens sometimes).  The directory that keep track of files is corrupt.  Disk Utility can help determine if that is the issue.  In some cases it can repair the problem but it cannot do it to a drive that is being used to boot the system while you are doing that.  You have to boot from another drive.  Some things DU cannot repair and you need to try a stronger utility such as Diskwarrior.
    A failing hard drive (one with mechanical issues) can be a cause of file structure issues but this is by no means always the case.  Apart from looking at the SMART diagnosis feature of Disk Utility (and smart isn't totally reliable) there often isn't a way to tell if a drive is failing until it suddenly happens, which is why you need to maintain backups.
    In your situation it does sound serious and not just minor directory corruption.  You can try erasing (formatting) the drive,  You may need to do this if it is really corrupt, in which case there could be underlying physical issues.  I use old technology but if you have the patience you can try erasing the drive with the security option of writing zeros once (don't do more unless you are going on a 3 week vacation).  This makes the drive not simply assume everything is okay by forcing it try every part of the drive by writing data.  If something is gong wrong you may find it marks a lot of bad sectors, or flat out refuses to format.  Then you know you need a new drive.

Maybe you are looking for