Near caches disappearing on cluster leave then join

In the situation where a node gets dropped from the cluster, either because of GC pauses, network problems or whatever, normally it will manage to join back into the cluster and all of the distributed caches come back. However it seems that near caches are not recreated when the node rejoins the cluster. This is very problematic as although the system seems to be healthy, its performance is dramatically reduced.
Why are these caches not being recreated? Is there some configuration to ensure this happens?
This is using Coherence 3.4. I haven't tested the 3.5 behavior yet.

Hi CormacB,
I guess you are referring to the fact that during "disconnect" the content of the front tier of the near cache is cleared. It is done to prevent the client using stale data. After the re-connect, the front map will start "refilling" from the back tier as the application gets the data, which is no different with what happens upon the near cache initialization.
Regards,
Gene

Similar Messages

  • Then new version of IMovie imported nearly all of my video and then suddenly closed.  Now it won't recognize the video that it stil hasn't imported?  I took the sd card out of the canon camcorder but still won't recognize or import it.  Is there a cache t

    Then new version of IMovie imported nearly all of my video and then  suddenly closed.  Now it won't recognize the video that it stil hasn't  imported?  I took the sd card out of the canon camcorder but still won't  recognize or import it.  Is there a cache that needs cleared?

    Did you get any joy with answering this?
    My first thought was that maybe when you imported you chose to leave the files  in place rather than copy then to the iMovie library..but I can't see where that option is now.
    I too have created a short movie from load f clips..but can't export or share either..the 'Share 'menu is empty..you go to it and no sub menu appears.

  • When I go to Preview to view a photo it shows up for less than a second then disappears and just leaves a gray box where the photo should be. iMac (Retina 5K, 27-inch, Late 2014). I need Preview for work.

    After the OS X Yosemite 10.10.3 update When I go to use Preview to view a photo it shows up for less than a second then disappears and just leaves a gray box where the photo should be. iMac (Retina 5K, 27-inch, Late 2014). I need Preview for work.

    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.
    The test works on OS X 10.7 ("Lion") and later. I don't recommend running it on older versions of OS X. It will do no harm, but it won't do much good either.
    Don't be put off by the complexity of these instructions. The process is much less complicated than the description. You do harder tasks with the computer all the time.
    2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    3. Below are instructions to run a UNIX shell script, a type of program. As I wrote above, it changes nothing. It doesn't send or receive any data on the network. All it does is to generate a human-readable report on the state of the computer. That report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents to me or anyone else.
    You should be wondering whether you can believe me, and whether it's safe to run a program at the behest of a stranger. In general, no, it's not safe and I don't encourage it.
    In this case, however, there are a couple of ways for you to decide whether the program is safe without having to trust me. First, you can read it. Unlike an application that you download and click to run, it's transparent, so anyone with the necessary skill can verify what it does.
    You may not be able to understand the script yourself. But variations of it have been posted on this website thousands of times over a period of years. The site is hosted by Apple, which does not allow it to be used to distribute harmful software. Any one of the millions of registered users could have read the script and raised the alarm if it was harmful. Then I would not be here now and you would not be reading this message. See, for example, this discussion.
    Nevertheless, if you can't satisfy yourself that these instructions are safe, don't follow them. Ask for other options.
    4. Here's a general summary of what you need to do, if you choose to proceed:
    ☞ Copy a particular line of text to the Clipboard.
    ☞ Paste into the window of another application.
    ☞ Wait for the test to run. It usually takes a few minutes.
    ☞ Paste the results, which will have been copied automatically, back into a reply on this page.
    These are not specific instructions; just an overview. The details are in parts 7 and 8 of this comment. The sequence is: copy, paste, wait, paste again. You don't need to copy a second time.
    5. Try to test under conditions that reproduce the problem, as far as possible. For example, if the computer is sometimes, but not always, slow, run the test during a slowdown.
    You may have started up in "safe" mode. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    6. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.
    7. Load this linked web page (on the website "Pastebin.") The title of the page is "Diagnostic Test." Below the title is a text box headed by three small icons. The one on the right represents a clipboard. Click that icon to select the text, then copy it to the Clipboard on your computer by pressing the key combination command-C.
    If the text doesn't highlight when you click the icon, select it by triple-clicking anywhere inside the box. Don't select the whole page, just the text in the box.
    8. Launch the built-in 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 and start typing the name.
    Click anywhere in the Terminal window to activate it. Paste from the Clipboard into the window by pressing command-V, then press return. The text you pasted should vanish immediately.
    9. If you see an error message in the Terminal window such as "Syntax error" or "Event not found," enter
    exec bash
    and press return. Then paste the script again.
    10. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. If you don't know the password, or if you prefer not to enter it, just press return three times at the password prompt. Again, the script will still run.
    If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.
    11. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, a series of lines will appear in the Terminal window like this:
    [Process started]
            Part 1 of 8 done at … sec
            Part 8 of 8 done at … sec
            The test results are on the Clipboard.
            Please close this window.
    [Process completed]
    The intervals between parts won't be exactly equal, but they give a rough indication of progress. The total number of parts may be different from what's shown here.
    Wait for the final message "Process completed" to appear. If you don't see it within about ten minutes, the test probably won't complete in a reasonable time. In that case, press the key combination control-C or command-period to stop it and go to the next step. You'll have incomplete results, but still something.
    12. When the test is complete, or if you stopped it because it was taking too long, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    At the top of the results, there will be a line that begins with the words "Start time." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    13. When you post the results, you might see an error message on the web page: "You have included content in your post that is not permitted," or "You are not authorized to post." That's a bug in the forum software. Please post the test results on Pastebin, then post a link here to the page you created.
    14. This is a public forum, and others may give you advice based on the results of the test. They speak for themselves, not for me. The test itself is harmless, but whatever else you're told to do may not be. For others who choose to run it, I don't recommend that you post the test results on this website unless I asked you to.
    Copyright © 2014, 2015 by Linc Davis. As the sole author of this work (including the referenced "Diagnostic Test"), I reserve all rights to it except as provided in the Use Agreement for the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • Updating Near Cache

    We currently have a Near-cache with a Partitioned-Cache on the Cluster.
    This contains about 60K objects which are quite large (they take about 60ms to load).
    We load the objects into the Near Cache using get(key) - the key is a Long
    Periodically the objects are changed on the cache, this causes them to expire and be removed from the Front NearCache.
    We do not want the 60ms delay when the multi-threaded application next comes to touch that object.
    In essense, we need a near cache that pro-actively maintains its working set in an up-to-date state, instead of the current "refresh on-demand" approach.
    We are very latency-sensitive and need to minimise the number of blocking network trips.
    - We want all the benefits of a NearCache (we use HighUnits/Expiry/Invalidation etc.)
    NOTE : It is not possible to use a Continuous Query Cache since the keys do not confirm to a Filter and are loaded on an ad-hoc basis by Key.
    There are two possible implementation options available:
    Plan A. When it receives an update event from the backing cache, instead of immediately removing the key from the front map, it should re-request the new value from the backing cache and update the front map with that new value. Insertions and deletions proceed as usual. This ensures an uninterrupted access from the client's perspective.
    Plan B. They may argue that this can leave the cache in an incoherent state while we are waiting for the new value (especially if it's done asynchronously). In this case, we can proceed with deleting the key from the front map, in anticipation that it will be reinserted when we receive a new value. This may impact the client with a delay while we are waiting for the new value. However, the likelyhood of such cache miss is rather small, unless the client requests the same keys repeatedly and very frequently. We may put up with occasional delays, but with the current implementation we incur a guaranteed delay.
    (We could use a Listener on the FrontMap and use a JavaThreadPoolExecutor which would reload the object by key).
    Perhaps we'd like a beforeUpdate event on the FrontMap, so the value does not disappear until we have had time to update it (the old object is good enough until we get the new value and better than a 60ms delay)
    Edited by: andrew.wilson on Aug 4, 2009 8:11 AM

    Hi Andrew,
    I just wanted to share the results of our offline conversation for the benefit of any others tracking this thread.
    Jon Purdy
    Oracle
    "My primary goal here is to avoid creating something that creates as many issues (from complexity) as it solves.
    I _think_ the best approach is probably to leave the near cache as it currently is, and wrap another "cache" around it (for read-only get-only access to potentially stale data). Your application code will need to decide which cache to access, but I think this is a good thing as you should be explicitly acknowledging the differing concurrency models (e.g. between a coherent cache and one that intentionally reduces coherency to increase data availability). I believe it would be best for this "cache" to actually expose a traditional DAO-ish interface (e.g. something like PotentiallyStaleCustomersDAO.findByPrimaryKey(long key)) rather than the more generic NamedCache interface; in part because implementing more than a couple methods of the NamedCache interface will get very tricky due to the unique semantics involved here.
    Your DAO implementation will need to maintain a small, thread-safe Map internally. This Map will contain stale values (exclusively) during the window between when an invalidation removes an item from the near cache, and when the prefetch places a new value in it. Your DOA will do a look-aside in that Map, and if it finds a value will return that; otherwise, it will route the request to the near cache.
    You'll need to create a custom listener and register it on the near cache (not sure if you'll want it on the near cache itself or just the internal front map).
    - On near cache "invalidate", push the "old" value into the DAO cache (this will be "by reference"), and asynchronously dispatch the prefetch task
    - On any other near cache deletion, remove the value from the DAO cache (just makes sure that the DAO isn't caching data that the near cache isn't)
    Use the same "Prefetch" task that "Plan B" called for, but extend it to remove the item from the DAO cache as soon as the call to "get" from the near cache completes. This will result in a benign race condition if another thread requests the same key, but you are assured that every "invalidation" will be matched by a corresponding "prefetch", which will keep the DAO cache clean (you can also make that DAO cache a size-limited local cache if you want, but as the size of it will be indirectly limited by the size of the near cache, it shouldn't be necessary).
    If you really want the NamedCache interface, you could configure a local cache and specify a CacheLoader for it; you would then wrap that CacheLoader around the finder method above, and specify an infinitesimal size/delay (e.g. 1 cache entry and 1ms expiry) on the cache. However, I would avoid doing this as you're widening your API and obfuscating the odd concurrency semantics of the data access. And most of the NamedCache methods would be useless to you."

  • Coherence multicast issue - nodes leaves, cannot join back

    We have six nodes in a cluster. We use multicast with a TTL=1. The nodes are all part of same VLAN.
    After certain period of inactivity, we see multiple nodes leaving the cluster with messages like below...
    2011-11-22 18:47:52,973 ERROR [STDERR] 2011-11-22 18:47:52.972/1840.837 Oracle Coherence GE 3.5.1/461 <Error> (thread=PacketListenerN, member=2): Stopping cluster due to unhandled exception: com.tangosol.net.messaging.ConnectionException: Unable to refresh sockets: [UnicastUdpSocket{State=STATE_OPEN, address:port=10.137.2.64:8088}, MulticastUdpSocket{State=STATE_OPEN, address:port=224.3.5.7:35473, InterfaceAddress=10.137.2.64, TimeToLive=1}, TcpSocketAccepter{State=STATE_OPEN, ServerSocket=10.137.2.64:8088}]; last failed socket: MulticastUdpSocket{State=STATE_OPEN, address:port=224.3.5.7:35473, InterfaceAddress=10.137.2.64, TimeToLive=1}
         at com.tangosol.coherence.component.net.Cluster$SocketManager.refreshSockets(Cluster.CDB:91)
         at com.tangosol.coherence.component.net.Cluster$SocketManager$MulticastUdpSocket.onInterruptedIOException(Cluster.CDB:9)
         at com.tangosol.coherence.component.net.socket.UdpSocket.receive(UdpSocket.CDB:33)
         at com.tangosol.coherence.component.net.UdpPacket.receive(UdpPacket.CDB:4)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketListener.onNotify(PacketListener.CDB:19)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: java.net.SocketTimeoutException: Receive timed out
         at java.net.PlainDatagramSocketImpl.receive0(Native Method)
         at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:145)
         at java.net.DatagramSocket.receive(DatagramSocket.java:725)
         at com.tangosol.coherence.component.net.socket.UdpSocket.receive(UdpSocket.CDB:20)
         at com.tangosol.coherence.component.net.UdpPacket.receive(UdpPacket.CDB:4)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketListener.onNotify(PacketListener.CDB:19)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:662)
    2011-11-22 18:47:52,973 ERROR [STDERR] 2011-11-22 18:47:52.973/1840.838 Oracle Coherence GE 3.5.1/461 <D5> (thread=Cluster, member=2): Service Cluster left the cluster
    2011-11-22 18:47:53,093 ERROR [STDERR] 2011-11-22 18:47:53.090/1840.955 Oracle Coherence GE 3.5.1/461 <D5> (thread=DistributedCache, member=2): Service DistributedCache left the cluster+
    The exact same message appears on 4 out of 6 nodes. Other two nodes then join back and form a smaller cluster.
    When the next request goes to one of the "dead" node, that node tries to join back with the original cluster and it fails with the message below. The same kind of message happens on another server as well. Thus neither can join back the original cluster or form a new one.
    Questions:
    *1. Why would the members leave?"*
    *2. When they try to join back why do they get exceptions trying to join back to the cluster?"*
    *3. What are the recommendation to ensure that the members can join back? How can we increase the retry count so that they don't give up on retrying after 3 attempts?"*
    *4. Is there something to be concerned about when it says "Service DistributedCache left the cluster"? What is its meaning?*
    2011-11-23 14:11:31,559 ERROR [STDERR] 2011-11-23 14:11:31.559/71659.424 Oracle Coherence GE 3.5.1/461 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2011-11-23 14:11:58,045 ERROR [STDERR] 2011-11-23 14:11:58.045/71685.910 Oracle Coherence GE 3.5.1/461 <Warning> (thread=Cluster, member=n/a): This Member(Id=0, Timestamp=2011-11-23 14:11:31.499, Address=10.137.2.64:8088, MachineId=33088, Location=site:company.net,machine:host2,process:3527) has been attempting to join the cluster at address 224.3.5.7:35473 with TTL 1 for 26 seconds without success; this could indicate a mis-configured TTL value, or it may simply be the result of a busy cluster or active failover.
    2011-11-23 14:11:58,047 ERROR [STDERR] 2011-11-23 14:11:58.047/71685.912 Oracle Coherence GE 3.5.1/461 <Warning> (thread=Cluster, member=n/a): Received a discovery message that indicates the presence of an existing cluster that does not respond to join requests; this is usually caused by a network layer failure:
    Message "SeniorMemberHeartbeat"
    FromMember=Member(Id=1, Timestamp=2011-11-22 18:15:41.108, Address=10.137.2.63:8088, MachineId=33087, Location=site:ie.intuit.net,machine:qypprdfisap01,process:13982, Role=JavaLangThread)
    FromMessageId=0
    Internal=false
    MessagePartCount=1
    PendingCount=0
    MessageType=17
    ToPollId=0
    Poll=null
    Packets
    [000]=Broadcast{PacketType=0x0DDF00D2, ToId=0, FromId=1, Direction=Incoming, ReceivedMillis=14:11:58.45, MessageType=17, MessagePartCount=1, MessagePartIndex=0, Body=0x0000000133CE3505340A89023F00000000000000000000000040001F980000813F0001050104040E636C75737465723A3078433541420D69652E696E747569742E6E6574400D71797070726466697361703031053133393832400E4A6176614C616E67546872656164000000000133D27C381B010000000500, Body.length=121}
    Service=ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_ANNOUNCE), Id=0, Version=3.5}
    ToMemberSet=null
    NotifySent=false
    LastRecvTimestamp=Wed Nov 23 14:11:56 PST 2011
    MemberSet=MemberSet(Size=2, BitSetCount=1, ids=[1, 3])
    2011-11-23 13:24:03,630 ERROR [STDERR] 2011-11-23 13:24:03.628/68794.632 Oracle Coherence GE 3.5.1/461 <D5> (thread=Cluster, member=n/a): Service Cluster left the cluster
    2011-11-23 13:24:03,632 ERROR [STDERR] 2011-11-23 13:24:03.632/68794.636 Oracle Coherence GE 3.5.1/461 <Error> (thread=ajp-0.0.0.0-8009-1, member=n/a): Error while starting cluster: com.tangosol.net.RequestTimeoutException: Timeout during service start: ServiceInfo(Id=0, Name=Cluster, Type=Cluster
    MemberSet=ServiceMemberSet(
    OldestMember=n/a
    ActualMemberSet=MemberSet(Size=0, BitSetCount=0
    MemberId/ServiceVersion/ServiceJoined/ServiceLeaving
    )

    Please do a test with %Coherence_Home%\bin\multicast-test.cmd to check that multicast is OK....
    and the do a test with %Coherence_Home%\bin\datagram-test.cmd to check your network performance....
    Look at the documentation it is well documented...

  • Update to near cache value is not reflected in the other near cache

    Hi,
    I have a cluster of two weblogic servers running within them tangosol cache. I also have two seperate tangosol servers running on the same two servers.
    When I make an update on the tangosol cache on one of the weblogic application, unfortunately the update is not picked up by the other weblogic application tangosol cache.
    What do I need to do so that all updates are available in all the tangosol cache?
    example below:
    initial:
    server1: weblogic tangosol near cache, key = "One", Value = null
    server2: weblogic tangosol near cache, key = "One", Value = null
    update on server1;
    server1: weblogic tangosol near cache, key = "One", Value = "New York"
    server2: weblogic tangosol near cache, key = "One", Value = null <- still null (?)
    Why is the value on server2 not updated also?
    Thanks.
    The tangosol configuration is a near distributed cache. The xml is below. Thanks.
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    <!--
    Caches with any name will be created as default replicated.
    -->
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>default-near</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <!--
    Default simple Near caching scheme with default eviction local cache
    in the front-tier and a non-expiring distributed cache in the back-tier.
    -->
    <near-scheme>
    <scheme-name>default-near</scheme-name>
    <front-scheme>
    <local-scheme>
    <scheme-ref>default-eviction</scheme-ref>
    </local-scheme>
    </front-scheme>
    <back-scheme>
    <distributed-scheme>
    <scheme-ref>default-distributed</scheme-ref>
    </distributed-scheme>
    </back-scheme>
    <!--
    invalidation auto = all changes in back caches gets notified
    present = subscribes to only changes thats held in near cache
    -->
    <invalidation-strategy>auto</invalidation-strategy>
    <!-- the cache server starts does not start all the schemes -->
    <autostart>false</autostart>
    </near-scheme>
    <!--
    Default Distributed caching scheme.
    -->
    <distributed-scheme>
    <scheme-name>default-distributed</scheme-name>
    <service-name>DistributedCache</service-name>
    <backing-map-scheme>
    <class-scheme>
    <scheme-ref>default-backing-map</scheme-ref>
    </class-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    <!--
    Default backing map scheme definition used by all the caches that do
    not require any eviction policies
    -->
    <class-scheme>
    <scheme-name>default-backing-map</scheme-name>
    <class-name>com.tangosol.util.SafeHashMap</class-name>
    <init-params></init-params>
    </class-scheme>
    <!--
    Default eviction policy scheme.
    -->
    <local-scheme>
    <scheme-name>default-eviction</scheme-name>
    <eviction-policy>HYBRID</eviction-policy>
    <high-units>100000</high-units>
    <low-units>0</low-units>
    <expiry-delay>0</expiry-delay>
    <flush-delay>0</flush-delay>
    <cachestore-scheme></cachestore-scheme>
    </local-scheme>
    </caching-schemes>
    </cache-config>

    We can certainly set up a call to discuss what you are seeing. Please email [email protected] with your phone number and other information to set up the call.
    The more information that you can provide in advance (on the forum or by email), the better. For example, send your configuration settings (cache configuration, cluster configuration) files.
    Peace.

  • Read-Through Caching with expiry-delay and near cache (front scheme)

    We are experiencing a problem with our custom CacheLoader and near cache together with expiry-delay on the backing map scheme.
    I was under the assumption that it was possible to have an expiry-delay configured on the backing-scheme and that the near cache object was evicted when backing object was evicted. But according to our tests we have to put an expiry-delay on the front scheme too.
    Is my assumption correct that there will not be automatic eviction on the near cache (front scheme)?
    With this config, near cache is never cleared:
                 <near-scheme>
                      <scheme-name>config-part</scheme-name>
                      <front-scheme>
                            <local-scheme />
                      </front-scheme>
                      <back-scheme>
                            <distributed-scheme>
                                  <scheme-ref>config-part-distributed</scheme-ref>
                            </distributed-scheme>
                      </back-scheme>
                <autostart>true</autostart>
                </near-scheme>
                <distributed-scheme>
                      <scheme-name>config-part-distributed</scheme-name>
                      <service-name>partDistributedCacheService</service-name>
                      <thread-count>10</thread-count>
                      <backing-map-scheme>
                            <read-write-backing-map-scheme>
                                  <read-only>true</read-only>
                                  <scheme-name>partStatusScheme</scheme-name>
                                  <internal-cache-scheme>
                                        <local-scheme>
                                              <scheme-name>part-eviction</scheme-name>
                                              <expiry-delay>30s</expiry-delay>
                                        </local-scheme>
                                  </internal-cache-scheme>
                                  <cachestore-scheme>
                                        <class-scheme>
                                              <class-name>net.jakeri.test.PingCacheLoader</class-name>
                                        </class-scheme>
                                  </cachestore-scheme>
                                  <refresh-ahead-factor>0.5</refresh-ahead-factor>
                            </read-write-backing-map-scheme>
                      </backing-map-scheme>
                      <autostart>true</autostart>
                      <local-storage system-property="tangosol.coherence.config.distributed.localstorage">true</local-storage>
                </distributed-scheme>With this config (added expiry-delay on front-scheme), near cache gets cleared.
            <near-scheme>
                      <scheme-name>config-part</scheme-name>
                      <front-scheme>
                            <local-scheme>
                                 <expiry-delay>15s</expiry-delay>
                            </local-scheme>
                      </front-scheme>
                      <back-scheme>
                            <distributed-scheme>
                                  <scheme-ref>config-part-distributed</scheme-ref>
                            </distributed-scheme>
                      </back-scheme>
                <autostart>true</autostart>
                </near-scheme>
                <distributed-scheme>
                      <scheme-name>config-part-distributed</scheme-name>
                      <service-name>partDistributedCacheService</service-name>
                      <thread-count>10</thread-count>
                      <backing-map-scheme>
                            <read-write-backing-map-scheme>
                                  <read-only>true</read-only>
                                  <scheme-name>partStatusScheme</scheme-name>
                                  <internal-cache-scheme>
                                        <local-scheme>
                                              <scheme-name>part-eviction</scheme-name>
                                              <expiry-delay>30s</expiry-delay>
                                        </local-scheme>
                                  </internal-cache-scheme>
                                  <cachestore-scheme>
                                        <class-scheme>
                                              <class-name>net.jakeri.test.PingCacheLoader</class-name>
                                        </class-scheme>
                                  </cachestore-scheme>
                                  <refresh-ahead-factor>0.5</refresh-ahead-factor>
                            </read-write-backing-map-scheme>
                      </backing-map-scheme>
                      <autostart>true</autostart>
                      <local-storage system-property="tangosol.coherence.config.distributed.localstorage">true</local-storage>
                </distributed-scheme>

    Hi Jakkke,
    The Near Cache scheme allows to have configurable levels of cache coherency from the most basic expiry based cache to invalidation based cache to data versioning cache depending on the coherency requirements. The Near Cache is commonly used to achieve the performance of replicated cache without losing the scalability aspects of replicated cache and this is achieved by having a subset of data (based on MRU or MFU) in the <front-scheme> of the near cache and the complete set of data in the <back-scheme> of near cache. The <back-scheme> updates can automatically trigger events to invalidate the entries in the <front-scheme> based on the invalidation strategy (present, all, none, auto) configured for the near cache.
    If you want to expire the entries in the <front-scheme> and <back-scheme>, you need to specify an expiry-delay on both the schemes as mentioned by you in the last example. Now if you are expiring the items in the <back-scheme> for the reason that they get loaded again from the cache-store but the <front-scheme> keys remain same (only the values should be refreshed from the cache store) then you need not set the expiry-delay on the <front-scheme> rather mention the invalidation-strategy as present. But if you want to have a different set of entries in <front-scheme> after a specified expiry delay then you need to mention it in the <front-scheme> configuration.
    The near cache has the capability to keep front scheme and back scheme data in sync but the expiry of entries is not synced. Always, front-scheme is a subset of back-scheme.
    Hope this helps!
    Cheers,
    NJ

  • How can I get a count of objects in the near cache? (Extend client)

    Hi,
    I'm trying to figure out how to get the count of objects in my near cache (from c++ client). Knowing the size of the near cache is a key factor when optimizing configurations for performance.
    However if I call size() on the cache handle I get the count of objects in the cache (ie the cluster). How can I get a count of objects in the near cache?
    Thanks
    Rich Carless

    H Rich,
    It may not be ideal, but I think you may be able to infer the size by using the HeapAnalyzer (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_heap_analyzer.html) facility, specifically the "class" based HeapAnalyzer. Its Snapshot representation http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_snapshot.html provides a mapping between class name and ClassStats (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_class_stats.html) which provides information on how many instances of a given class type are in memory. Note the reported counts are process wide but if your key or value type are distinct you may be able to infer your answer. I realize this is rather complex, my only other suggestion would be to just make some guesses on size and see how they effect performance.
    Mark
    Oracle Coherence

  • Building a better near cache

    I'm currently putting some code together to use for frequently updated data. The data set is large enough to warrant a distributed cache, and it will be read frequently by other cluster members than the key owner. To add to this, when the data changes it will trigger some business logic on the cluster members that had previously read the data.
    In effect, it is a distributed cache in which clients can subscribe to particular keys to be notified when the underlying data changes.
    The data is volatile and has very high update frequency so there's no point in backing it up on a second node, so I've configured a distributed-cache with 0 backups.
    I've implemented a working prototype by wrapping a near cache and front-map listener. The wrapper maintains a set of current subscribers for each key, and each time a key is invalidated as per the near-schemes invalidation strategy the value is re-requested if the subscriber set is non empty. This works fine, but I'd like to get rid of the extra invalidate and get packages and instead get the updated value sent directly instead of the invalidation.
    So here's a couple of questions:
    1) Is it possible to get this behaviour from a near cache out of the box (docs are slightly vague, and I haven't been able to get it to work by trial and error)
    2) If I were to stop using a near-cache and register a map listener for the keys directly on the distributed cache:
    a) is the key match evaluated on the object form or the binary representation of the cached key - I'm concerned about the cpu overhead when deserialising the keys?
    b) if there's more than one listener for the specified key, will the update package be sent using unicast or multicast?

    Hi Henric,
    I gave some thinking on this since yesterday.
    It might be worth investigating to see if you could override the listener handling and registration methods which near cache uses so that you could use whatever notifications are sent anyway.
    1. : I can't answer this at the moment.
    2. a: I believe the key match is done on the binary key. I don't see any reason why not to use the binary key.
    2. b: I think it depends on how many listeners. Look at the documentation of the multicast-threshold-percent setting within the multicast-listener configuration.
    Best regards,
    Robert

  • Stale Near Cache data when all Cache Server fails and are restarted

    Hi,
    We are currently making use of Coherence 3.6.1. We are seeing an issue. The following is the scenario:
    - caching servers and proxy server are all restarted.
    - one of the cache say "TestCache" is bulk loaded with some data (e.g. key/value of : key1/value1, key2/value, key3/value3) on the caching servers.
    - near cache client connects onto the server cluster via the Extend Proxy Server.
    - near cache client is primed with all data from the cache server "TestCache". Hence, near cache client now has all key/values locally (i.e. key1/value1, key2/value, key3/value3).
    - all caching servers in the cluster is down, but the extend proxy server is ok.
    - all cache server in the cluster comes back up.
    - we reload all cache data into "TestCache" on the cache server, but this time it only has key/value of : key1/value1, key2/value.
    - So the caching server's state for "TestCache" is that it should only have key1/value1, key2/value, but the near cache client still thinks it's got key1/value1, key2/value, key3/value3. So in effect, it still knows about key3/value3 which no longer exists.
    Is there anyway for the near cache client to invalidate the key3/value3 automatically? This scenario happens because the extend proxy server is actually not down, but all caching servers are, but the near cache client for some reason doesn't know about this and does not invalidate the cache client near cache data.
    Can anyone help?
    Thanks
    Regards
    Wilson.

    Hi,
    I do have the invalidation strategy as "ALL". Remember this cache client is connected via the Extend proxy server where it's connectivity is still ok, just the caching server holding the storage data in the cluster are all down.
    Please let me know why else we can try.
    Thanks
    Regards
    Wilson.

  • Near Cache JMX Monitoring

    Hi,
    Can the JMX monitoring capabilities of Coherence be used to monitor the hit-rate of a near cache, i.e. by adding the JMX command line options to the extend client - to determine how effective it is?
    Thanks

    Hi dxfelcey,
    You can get to the NearCache statistics by querying CacheMBean(s) with key attribute "tier=front". For example, the following query will return you a set of ObjectNames for all MBeans representing NearCache called "test" instances across the cluster:
    MBeanServer mbs=MBeanHelper.findMBeanServer();
    Set setNames = mbs.queryNames(new ObjectName("type=Cache,name=test,tier=front,*"), null);For more information please see the Registry Javadoc here:
    http://download.oracle.com/otn_hosted_doc/coherence/330/com/tangosol/net/management/Registry.html
    and the Coherence Wiki page here:
    http://wiki.tangosol.com/display/COH33UG/Managing+Coherence+using+JMX
    Regards,
    Gene

  • Example of a Coherence near cache config.

    Looking at the wiki, it states that the near cache is
    Listener-based Near caches are coherent; expiry-based near caches are partially coherent for non-transactional reads and coherent for transactional access.
    Is there a configuration file example for a listener-based near cache?

    Hi George,
    Near cache example: Local cache of a partitioned cache (Near cache).
    invalidation-strategy element of a near-scheme specifies the strategy used keep the front-tier in-sync with the back-tier:
    * none - instructs the cache not to listen for invalidation events at all. This is the best choice for raw performance and scalability when business requirements permit the use of data which might not be absolutely current. Freshness of data can be guaranteed by use of a sufficiently brief eviction policy. The worst case performance is identical to a standard Distributed cache.
    * present - instructs the near cache to listen to the back map events related only to the items currently present in the front map.
    This strategy works best when cluster nodes have sticky data access patterns (for example, HTTP session management with a sticky load balancer).
    * all - instructs the near cache to listen to all back map events.
    This strategy is optimal for read-heavy access patterns where there is significant overlap between the front caches on each cluster member.
    * auto - instructs the near cache to switch between present and all strategies automatically based on the cache statistics.
    Regards,
    Dimitri

  • RAM Cache Disappears

    Hello,
    I've been having an issue where the RAM cache disappears as soon as the RAM playback is stopped.  Just to be clear, I'm referring to the green indicator along the top of the timeline so you know which frames are cached.  This happens on various computers in our facility.  It seems to be more common when multiprocessing is enabled.  It also happens if you tell After Effects to RAM preview and then switch to another application.  After Effects will complete rendering the RAM preview in the background, the icon will bounce in the dock to let you know it's ready, but nothing is cached when you switch back to After Effects.  This is something that I've noticed for a couple of years over multiple versions of After Effects both at home and at the office.  It seems to happen fairly consistently with specific comps which makes me wonder if it's related to any of the effects that have been applied in that comp.  Any information regarding this behavior would be very much appreciated.  Thanks!
    Dave Jacobson
    After Effects CC 12.0
    Mac Pro 5,1
    OS X 10.8.4
    2 x 2.66 GHz 6-Core Intel Xeon
    48GB RAM
    GTX 680

    We have seen this ocassionally happen when Render Mutliple Frames Simultaneously multiprocessing is on. If you have a specific case or cases where this is happening, please submit bugs.

  • Can off JVM heap Memory used in the Near-Cache front-tier

    I had tried to config a near-Cache used nio-manager(off JVM heap) in the Front-tier.
    <near-scheme>
          <scheme-name>CohApp-near</scheme-name>
          <front-scheme>
            <external-scheme>
            </external-scheme>
          </front-scheme>
          <back-scheme>
            <distributed-scheme>
              <scheme-ref>CohApp-distributed</scheme-ref>
            </distributed-scheme>
          </back-scheme>
          <invalidation-strategy>auto</invalidation-strategy>
          <autostart>true</autostart>
        </near-scheme>
    when start 'com.tangosol.net.DefaultCacheServer' for this config, error as:
    Oracle Coherence Version 3.7.1.0 Build 27797
    Enterprise Edition: Development mode
    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    2014-03-30 16:34:17.518/1.201 Oracle Coherence EE 3.7.1.0 <Error> (thread=main,
    member=n/a): Error org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invali
    d content was found starting with element 'external-scheme'. One of '{"http://xm
    lns.oracle.com/coherence/coherence-cache-config":local-scheme, "http://xmlns.ora
    cle.com/coherence/coherence-cache-config":class-scheme}' is expected. - line 92
    Exception in thread "main" (Wrapped: Failed to load the factory) (Wrapped: Missi
    ng or inaccessible constructor "com.tangosol.net.DefaultConfigurableCacheFactory
    (String)"
    <configurable-cache-factory-config>
      <class-name>com.tangosol.net.DefaultConfigurableCacheFactory</class-name>
      <init-params>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>coherence-cache-config.xml</param-value>
        </init-param>
      </init-params>
    </configurable-cache-factory-config>) java.lang.reflect.InvocationTargetExceptio
    n
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getDefaultFactory(ScopedCa
    cheFactoryBuilder.java:311)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getSingletonFactory(Defau
    ltCacheFactoryBuilder.java:48)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getFactory(DefaultCacheFa
    ctoryBuilder.java:121)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getConfigurableCacheFactor
    y(ScopedCacheFactoryBuilder.java:112)
            at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactor
    y.java:126)
            at com.tangosol.net.DefaultCacheServer.getDefaultConfigurableCacheFactor
    y(DefaultCacheServer.java:364)
            at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)
    Caused by: (Wrapped: Missing or inaccessible constructor "com.tangosol.net.Defau
    ltConfigurableCacheFactory(String)"
    <configurable-cache-factory-config>
      <class-name>com.tangosol.net.DefaultConfigurableCacheFactory</class-name>
      <init-params>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>coherence-cache-config.xml</param-value>
        </init-param>
      </init-params>
    </configurable-cache-factory-config>) java.lang.reflect.InvocationTargetExceptio
    n
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2652)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2536)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getDefaultFactory(ScopedCa
    cheFactoryBuilder.java:273)
            ... 6 more
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:694)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2611)
            ... 8 more
    Caused by: (Wrapped: Failed to load cache configuration: coherence-cache-config.
    xml) (Wrapped) java.io.IOException: Exception occurred during schema validation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:34
    1)
            at com.tangosol.run.xml.XmlHelper.loadFileOrResource(XmlHelper.java:283)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultCo
    nfigurableCacheFactory.java:439)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultCo
    nfigurableCacheFactory.java:425)
            at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfig
    urableCacheFactory.java:155)
            ... 14 more
    Caused by: (Wrapped) java.io.IOException: Exception occurred during schema valid
    ation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:122)
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:157)
            at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:32
    2)
            ... 18 more
    Caused by: java.io.IOException: Exception occurred during schema validation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:212)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:93)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:162)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:115)
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:118)
            ... 20 more
    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid conten
    t was found starting with element 'external-scheme'. One of '{"http://xmlns.orac
    le.com/coherence/coherence-cache-config":local-scheme, "http://xmlns.oracle.com/
    coherence/coherence-cache-config":class-scheme}' is expected.
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAX
    ParseException(ErrorHandlerWrapper.java:195)
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Err
    orHandlerWrapper.java:131)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
    XMLErrorReporter.java:384)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
    XMLErrorReporter.java:318)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErro
    rReporter.reportError(XMLSchemaValidator.java:417)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportS
    chemaError(XMLSchemaValidator.java:3182)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleS
    tartElement(XMLSchemaValidator.java:1806)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startEl
    ement(XMLSchemaValidator.java:705)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
    StartElement(XMLNSDocumentScannerImpl.java:400)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
    MLDocumentScannerImpl.java:648)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
    (XMLNSDocumentScannerImpl.java:140)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:808)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:737)
            at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHel
    per.validate(StreamValidatorHelper.java:144)
            at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.vali
    date(ValidatorImpl.java:111)
            at javax.xml.validation.Validator.validate(Validator.java:127)
            at com.tangosol.run.xml.SaxParser.validateXsd(SaxParser.java:236)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:206)
    So I think that if can off JVM heap Memory used in the Near-Cache front-tier?
    Or can help how to config the  off JVM heap Memory used in the Near-Cache front-tier.
    Thanks.

    Only local-scheme and class-scheme can be used in the front-scheme of a near cache. 

  • How to get cache statistics of back map in a near cache

    Hi-
    I have a near cache configured.
    Local cache makes the front cache and Distributed cache makes the back cache.
    I am able to get statistics of front cache using coherence API, like as below.
    NamedCache coherenceCache = CacheUtils.getNamedCache( CacheUtils.getCacheRegionPrefix() + region.getRegionName() );
              if (coherenceCache instanceof NearCache)
                   NearCache nearCache = (NearCache)coherenceCache;
                   CachingMap cachingMap = (CachingMap)nearCache;
                   CacheStatistics frontStatistics = ((LocalCache)nearCache.getFrontMap()).getCacheStatistics();
    How do i get the statistics of back map?
    If i do below, it gives statistics which combines data for both front and back (That is what i infer based on my understanding - it increases get count in both front and back even if get it done in front cache)
                   CacheStatistics backStatistics = cachingMap.getCacheStatistics();
    So is there any way to get statistics for back cache alone with Coherence API for a near cache?
    Any help on this be much appreciated
    thanks

    Hi,
    NamedCache coherenceCache = CacheUtils.getNamedCache( CacheUtils.getCacheRegionPrefix() + region.getRegionName() );
    if (coherenceCache instanceof NearCache)
    NearCache nearCache = (NearCache)coherenceCache;
    CachingMap cachingMap = (CachingMap)nearCache;
    Map backingMap = cachingMap.getBackMap();
    OR
    Map backingMap = nearCache.getBackMap();
    getFrontMap() and getBackMap() are methods from CachingMap.
    Thanks & Regards,
    Murali.
    ============

Maybe you are looking for

  • Home Hub 3 Security exposure allowing VOIP (SIP) t...

    OK its a bit tech but BT don't seem interested but it worries me! I have a HH3 configured with with Firewall set to Default (to block unsolicited incomming traffic), DMZ disabled (so no default routing of inbound connections) and UnNP off (So no dyna

  • Mobile Accounts:  Computer or User?

    I finally figured out how to set up my DNS/LDAPv3/server on my LAN.  But, playing around with setting up Users and Computers is still confusing.  I had unsucessfully set up a mobile account (multiple times), with a user directory (by accident), but w

  • New G/L or Special G/L

    Dear Friends, Kindly explain to me what is new g/l or special g/l in sap. what is the advantage of new g/l or special g/l. what are the setting we have to do for new g/l or special g/l. kindly explain to me detailed, Thanking you sarith

  • Blank TOC with a red "X" / Java errors

    Everyone, I've been asked to troubleshoot a problem with a build, actually a series of builds in a WebHelp project, built in RH X5 on Windows XP. The project contains about 7 different builds, with conditional expressions (LOTS of them) in each one.

  • Can I connect my iPhone to my PC via a USB bluetooth dongle?

    I get the following message on phone. 'Connection Unsuccessful. "Home PC" is not supported' Tthen a button that says 'Forget Device'