Over a million developers have joined DZone.

Red Hat JBoss BRMS & BPM Suite - Taking out the Git Garbage

DZone's Guide to

Red Hat JBoss BRMS & BPM Suite - Taking out the Git Garbage

· Java Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

This weeks tips and tricks article will help you to keep your current JBoss BPM Suite and JBoss Business Rules Management System (BRMS) running like a fine tuned machine. 

The basic architecture of the two products are the same, relying on maven as the deployment mechanism behind the scenes and Git as the source code management system backing your projects.

When using Git there is a feature that we often never need to think about as it happens magically behind some of the commands we are using to clean up the git repository. It is known as garbage collection and you can find theGit garbage collection explained in great detail online.

The issue here that has been documented in the products "Known Issues" section, is that the Business Central workbench is interfacing behind the scenes with a git backend with commands that are not triggering the usual garbage collection on your repository.

Deployments leveraging Git

Without this maintenance you might begin to experience slower interactions with the repository as over time as files are growing rapidly.

To fix this you can run the git garbage collector in one of several ways:

# Run garbage collection in auto mode, allowing
# git to determine if it is needed before running.
$ cd <path-to-repos/project-repo>
$ git gc --auto

# Run garbage collection aggressively to prune
# everything it can, which will take longer.
$ cd <path-to-repos/project-repo>
$ git gc --aggressive --prune=all

You can put one of these garbage collection strategies into a script and run it periodically as you see fit.

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}