Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Proper place to store background job related data?

Avatar

Avatar
Validate 1
Level 1
EricES
Level 1

Likes

2 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
View profile

Avatar
Validate 1
Level 1
EricES
Level 1

Likes

2 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
View profile
EricES
Level 1

01-03-2019

In order to allow delta indexing for our Solr cores, we store the last index time. Currently, it's only stored in memory in a Java map, so the value is lost on server restart.

What is the proper place to store a value like this?

Configuration comes to mind, but I don't want it to be configurable. It's only needed by the background job that fires off the Solr indexing.

Should it be stored in the CRX in the "apps" node somewhere? That doesn't seem quite right to me, and I'd have to be careful so deployments wouldn't overwrite it there, too.

What's the best way to do this?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 3
wimsymons
Level 3

Likes

13 likes

Total Posts

49 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
wimsymons
Level 3

Likes

13 likes

Total Posts

49 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
wimsymons
Level 3

02-03-2019

You can store it below /var.

We store all such data in a subfolder below /var/companyname.

For your case, I’d suggest /var/yourcompany/solr where you have a property lastindextime of type Date.

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 1
EricES
Level 1

Likes

2 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
View profile

Avatar
Validate 1
Level 1
EricES
Level 1

Likes

2 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
View profile
EricES
Level 1

04-03-2019

Perfect! Exactly what I was looking for.