[ https://issues.apache.org/activemq/browse/CAMEL-3249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62677#action_62677 ]
Glenn Moss commented on CAMEL-3249: ----------------------------------- Here's how I've used the aggregator: {code} from("activemq:source") .aggregate(header("some-id"), new MyAggregationStrategy()) .aggregationRepository(new HawtDBAggregationRepository("repo", "hawtdbfile")) .to("activemq:destination"); {code} I've replicated the behaviour with only HawtDB. By opening a new HawtDB file, and only putting in data of a fixed size into the identical key, the file size grows indefinitely, depending on the size of the data. In the following code, the breakpoint appears to be at 489 characters of data. The file size remains constant with 488 character string, but grows indefinitely with a 489-character string. I think this probably has something to do with how the size of the data relates to the page size (set on TxPageFileFactory). {code} public class App { public static void main (String[] args) { String filename = args[0]; int dataSize = Integer.parseInt(args[1]); BTreeIndexFactory<String, String> indexFact = new BTreeIndexFactory<String, String>(); indexFact.setKeyCodec(StringCodec.INSTANCE); indexFact.setValueCodec(StringCodec.INSTANCE); indexFact.setDeferredEncoding(true); TxPageFileFactory pageFact = new TxPageFileFactory(); pageFact.setFile(new File(filename)); pageFact.setPageSize((short)512); pageFact.setMappingSegementSize(8 * 1024 * 1024); pageFact.setSync(true); pageFact.open(); TxPageFile pageFile = pageFact.getTxPageFile(); Transaction tx = pageFile.tx(); if (!tx.allocator().isAllocated(0)) { SortedIndex<String, String> created = indexFact.create(tx); } tx.commit(); pageFile.flush(); String data = ""; for (int i = 0; i < dataSize; i++) { data += "0"; } try { while (true) { tx = pageFile.tx(); SortedIndex<String, String> index = indexFact.open(tx); index.put("foo", data); tx.commit(); pageFile.flush(); } } finally { pageFact.close(); } } } {code} > HawtDB file grows indefinitely over time > ---------------------------------------- > > Key: CAMEL-3249 > URL: https://issues.apache.org/activemq/browse/CAMEL-3249 > Project: Apache Camel > Issue Type: Bug > Components: camel-hawtdb > Affects Versions: 2.5.0 > Environment: Using 2.5-SNAPSHOT > Reporter: Glenn Moss > > When using an aggregator with the HawtDB persistent store, the file grows > indefinitely until it fills the volume on which it's stored. This prevents > the persistence from being used in any kind of long-running production > deployment. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.