Kale Vivi
Kale Vivi
JCHJava Community | Help. Code. Learn.
Created by Kale Vivi on 1/19/2025 in #java-help
Dealing with concurrent updates
Does anyone have suggestions on resources, concepts and topics to look into on handling concurrent updates? Like I have two different systems possibly updating the same record/object, how should I be handling concurrent updates to prevent duplicates and other issues. The two different systems have their own db but eventually the shared data has to be written in a middleware postgres db that has to handle the concurrent scenarios.
12 replies
JCHJava Community | Help. Code. Learn.
Created by Kale Vivi on 12/16/2024 in #java-help
Sequence allocation size question
Hi, I have a question on what my allocation size should be for my call to batch insert records into a table. I'm using sequence generator and I have a batch process that has to insert or update 50,000 records. I'm noticing the performance for this process isn't great and I read online I might need to adjust allocation size (currently have it as 1). So if I'm batch inserting in batches of 500 records, does that mean my allocation size should be 500?
56 replies
JCHJava Community | Help. Code. Learn.
Created by Kale Vivi on 11/9/2024 in #java-help
Best modern resources for new Sprint Boot project
Can anyone share their favorite resources on: 1. adding integration tests and setting up tests/mocks for a new Spring Boot 3 project 2. Understand more and any changes around spring context 3. Any new logging features/recss Thanks!
4 replies
JCHJava Community | Help. Code. Learn.
Created by Kale Vivi on 11/6/2024 in #java-help
Setting up a new spring boot application and running into an issue only in deployed env
So, I recently started a new spring boot application and I setup the security config and added one endpoint. I tested that I'm able to hit the endpoint I added and the actuator endpoint locally. However, when deployed on Kubernetes, my app pod is constantly restarting with connection refused for /actuator/info. When I try to hit the endpoint directly (deployed one), I get this strange error: { "error": "no handler found for uri [/actuator/info] and method [GET]" } Does anyoen know why that message appears and what additional config I'm missing?
4 replies
JCHJava Community | Help. Code. Learn.
Created by Kale Vivi on 12/1/2023 in #java-help
Is it a bad practice to have multiple entities for the same table?
Mainly so not to load everything and define everything for that table and only have fields that are needed for particular usecase. My understanding is normally this is what a DTO is used for but I say this because joins and other data pulls can be expensive and a more lightweight entity can be useful in some cases. However, is this kind of bad practice?
6 replies
JCHJava Community | Help. Code. Learn.
Created by Kale Vivi on 4/5/2023 in #java-help
Fetch all records from endpoint works but it's very slow.
I have a call to an api where I need to fetch all records under for a certain object and api number of records is about 39,000 records. The api has a limit of 1000 for pagination (I can't set the limit to 39,000 in one go). So I have to batch the calls to the api. Currently, the code I have is working and I'm able to pull all 39,000 records but this call is taking around 30 secs to a 1 min to finish. I was wondering how can I refactor the code below to 1) make it cleaner 2) more performant (In the ms or 1 territory versus 30s to 1min). Any advice here?
60 replies