Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8379141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:05:55+00:00 2026-06-09T16:05:55+00:00

I have multiple Java tasks that access solr and write and commit some documents

  • 0

I have multiple Java tasks that access solr and write and commit some documents sequentially. Often these tasks change the same document. My problem is that one task may trigger a commit, terminates, pass the control to the other task which in turn issue another commit. When the first commit isn’t done before the second task starts, I get solr lock timeout exception.

One solution I was investigating is to have each of these tasks simply do an update and no commit. The problem, however is that changes by early tasks are not visible to later tasks. Thus the later tasks end up overwriting some of the changes done by the previous ones.

Now, I am investigating whether I can detect the end of each commit before triggering the next task. Any idea?

How would you guys resolve this problem?

These tasks are off-the-shelf non-trivial components that i cannot really change.

Thanks,
Max

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:05:55+00:00Added an answer on June 9, 2026 at 4:05 pm

    It sound like you are trying to have the commit happen in the background after the “task” terminates. You’d be better off doing the commit synchronously; i.e. don’t terminate the task until the commit has succeeded (or failed). (I’ll admit that I don’t use Solr, and I don’t know how you would map those ideas to the Solr APIs.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have various Java Swing applications that are used by multiple users. My deployment
Do Java collections have a built-in method to return multiple items from that collection?
I'm working on a Java project where I need to have multiple tasks running
How can I have multiple buttons and multiple listeners doing various operations in java
I had a question about Java Class Path variables. If I have multiple jars
I have a situation where a Java Applet hangs after being opened multiple times.
Question:- Does java client need to worry about multiple servers ? Meaning:- I have
I am writing a translator, and have quite a few java String literals that
I have written a java application that sporadically logs events to an SQLite database
Let's say I have multiple scheduled tasks running at different times, but all of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.