Implementations - Logic of connecting users and producers - Message keys can be duplicated - Error in aligning consumer offsets with messages - No mood for producer - No execution for multiple brokers - Consumer group is hardcoded
Java
What is the difference between Spring and Spring Boot?
If I often read but rarely insert data, which Map is better to use?
What is the main problem with this implementation SELECT f.food_id FROM Foods f JOIN Expirations e ON f.id = e.food_id WHERE e.is_expired = 1; - Using `JOIN` instead of `WHERE EXISTS` to check for record existence. - No index on the e.is_expired field - JOIN keys are not indexed - The Expirations table is redundant - The query is not protected within a transaction.
What is the main problem of the chosen solution structure - No special exception handling during startup - Configuration class without @Configuration annotations - Incorrect dependency injection setup - Incorrect integration of custom configs changing property load order - @Autowired dependencies missing
Postgres processed the information, understood that the data exists. What does it send back? Immediately the data as a row map or something else?
What are the main locking strategies used by databases to handle concurrent access?
What is the main problem of this implementation - Inefficient use of a fixed thread pool - Issues with shared resource interaction - Incorrect inclusion of locking can lead to deadlock situations. - Incorrect level of synchronization - No checks of all threads before the result - No explicit constructor Code: import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; class RecyclingBinCounter { private int binCount; private final ReentrantLock lock = new ReentrantLock(); public void incrementBins() { lock.lock(); try { binCount++; } finally { } } public int getBinCount() { return binCount; } } class RecyclingManager { public static void main(String[] args) { RecyclingBinCounter counter = new RecyclingBinCounter(); ExecutorService service = Executors.newFixedThreadPool(3); for (int i = 0; i < 3; i++) { service.submit(() -> { for (int j = 0; j < 1000; j++) { counter.incrementBins(); } }); } service.shutdown(); while(!service.isTerminated()) {} System.out.println("Total bins collected: " + counter.getBinCount()); } }
Which of the recent tasks did you find interesting, challenging, and memorable?
Briefly tell about the architecture of the service.
Why did you choose wait/notify specifically, rather than ReentrantLock?
If there are multiple offers from several companies, what criteria will you use to make a choice? Name three.
What problems does Spring Kafka have with virtual streams? Or are there no problems at all?
Какой побочный эффект возникает при выполнении кода BEGIN; SET TRANSACTION ISOLATION LEVEL READ COMMITTED; START TRANSACTION; SELECT progress INTO @current_progress FROM courses WHERE course_id = 101; SET @current_progress = @current_progress + 60; UPDATE courses SET progress = @current_progress WHERE course_id = 101; COMMIT; END; BEGIN; SET TRANSACTION ISOLATION LEVEL READ COMMITTED; START TRANSACTION; SELECT progress INTO @current_progress FROM courses WHERE course_id = 101; SET @current_progress = @current_progress + 40; UPDATE courses SET progress = @current_progress WHERE course_id = 101; COMMIT; END;
What is the main problem with the chosen solution structure? The Property class does not support polymorphism. Class fields may be uninitialized. Method of transferring total cost calculation to the 'Order' class. Does not use transactional mechanisms. No exceptions are thrown for an empty list.
Would you hook into the Kafka Listener lifecycle via KafkaListenerEndpointRegistry or explicit polling through KafkaConsumer?
Which technologies do you like the most?
Tell us about the lifecycle of a bean in Spring.
What do you do with DLT topics?
What are the levels of transaction isolation in SQL and which one is set by default in PostgreSQL?