[Design of Messaging on JBoss (Messaging/JBoss)] - JBMESSAGING-1678 - OME on Journal Load
by clebert.suconic@jboss.com
As stated on the jira (https://jira.jboss.org/jira/browse/JBMESSAGING-1678), when you have too many files on the journal, the load will fail with OME.
I didn't find a way to use a Map, as we need the order of Adds and updates preserved.
An easy solution so far, was to cleanup the lists every time the list is too big.
Any time the list gets too big (to an arbitrary constant number of elements) I simply cleanup the list.
Changes:
public synchronized long load(final List<RecordInfo> committedRecords,
| final List<PreparedTransactionInfo> preparedTransactions) throws Exception
| {
| ...
|
| final int DELETE_FLUSH = 20000;
|
| ...
| public void deleteRecord(final long id)
| {
| recordsToDelete.add(id);
|
| if (recordsToDelete.size() == DELETE_FLUSH)
| {
| Iterator<RecordInfo> iter = records.iterator();
| while (iter.hasNext())
| {
| RecordInfo record = iter.next();
|
| if (recordsToDelete.contains(record.id))
| {
| iter.remove();
| }
| }
|
| recordsToDelete.clear();
| System.out.println("after cleanup " + records.size());
|
| }
| }
| });
|
I don't want to add another configuration property for this. (I would just keep the constant instead of bothering the user with another descision at runtime).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242306#4242306
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242306
16 years, 9 months
[Design the new POJO MicroContainer] - Re: Parallel deployments
by kabir.khan@jboss.com
I have marked the jboss.messaging:service=PostOffice mbean as asynchronous as well, since that is taking a very long time to start up. The cool thing is that now the core server takes 23 seconds to start up (down from 33s), but we are getting the unsatisfied dependencies I was expecting in a previous post. I'll try to fix that as Ales suggested, but does it look weird that the server keeps installing stuff after it has "started"? If user applications have dependencies on jms, they cannot be started until the background stuff has installed.
| 18:54:07,391 INFO [STDOUT]
| ---------------------------------------------------------
| GMS: address is 127.0.0.1:50224 (cluster=MessagingPostOffice-CTRL)
| ---------------------------------------------------------
| ...
| 18:54:07,568 INFO [ProfileServiceBootstrap] Loading profile: ProfileKey@ece555[domain=default, server=default, name=all]
| 18:54:07,572 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is missing the following dependencies:
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Start", but is actually in state "Create")
| Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies:
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Start", but is actually in state "Create")
| Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the following dependencies:
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Start", but is actually in state "Create")
| Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies:
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Start", but is actually in state "Create")
| Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the following dependencies:
| Dependency "jboss.messaging:service=PostOffice" (should be in state "Start", but is actually in state "Create")
| Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies:
|
| 18:54:07,580 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
| 18:54:07,594 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
| 18:54:07,599 INFO [ServerImpl] JBoss (Microcontainer) [6.0.0-SNAPSHOT] Started in 22s:959ms
| 18:54:09,394 INFO [GroupMember] org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener@f3a92 got new view [127.0.0.1:50224|0] [127.0.0.1:50224], old view is null
| 18:54:09,395 INFO [GroupMember] I am (127.0.0.1:50224)
| 18:54:09,395 INFO [GroupMember] New Members : 1 ([127.0.0.1:50224])
| 18:54:09,395 INFO [GroupMember] All Members : 1 ([127.0.0.1:50224])
| 18:54:09,406 INFO [STDOUT]
| ---------------------------------------------------------
| GMS: address is 127.0.0.1:7900 (cluster=MessagingPostOffice-DATA)
| ---------------------------------------------------------
| 18:54:14,438 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
| 18:54:14,495 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
| 18:54:14,495 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@5d24e1 started
| 18:54:14,497 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
| 18:54:14,497 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@a285d0 started
| 18:54:14,704 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
| 18:54:15,538 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
| 18:54:15,538 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@d4ca03 started
| 18:54:15,540 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
|
The log message at 18:54:07 is output after installing the first of two channels by the post office service, so it is taking a long time. I'm not familiar with JBoss Messaging, but maybe those two channels can be installed in parallel as Brian did for the HAPartition bean, if JBoss Messaging is not doing so already. As I understand it, we're due a new release of JBoss Messaging in AS trunk sometime?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242286#4242286
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242286
16 years, 9 months