MCPcopy Create free account
hub / github.com/apache/impala / TEST_F

Function TEST_F

be/src/runtime/bufferpool/buffer-pool-test.cc:538–555  ·  view source on GitHub ↗

Test that queries and clients can be registered and deregistered with the reservation trackers and the buffer pool.

Source from the content-addressed store, hash-verified

536/// Test that queries and clients can be registered and deregistered with the reservation
537/// trackers and the buffer pool.
538TEST_F(BufferPoolTest, BasicRegistration) {
539 int num_concurrent_queries = 1024;
540 int64_t sum_initial_reservations = 4;
541 int64_t reservation_limit = 1024;
542 // Need enough buffers for all initial reservations.
543 int64_t total_mem = sum_initial_reservations * num_concurrent_queries;
544 global_reservations_.InitRootTracker(NewProfile(), total_mem);
545
546 BufferPool pool(test_env_->metrics(), TEST_BUFFER_LEN, total_mem, total_mem);
547
548 RegisterQueriesAndClients(&pool, 0, num_concurrent_queries, sum_initial_reservations,
549 reservation_limit, &rng_);
550
551 ASSERT_EQ(global_reservations_.GetUsedReservation(), 0);
552 ASSERT_EQ(global_reservations_.GetChildReservations(), 0);
553 ASSERT_EQ(global_reservations_.GetReservation(), 0);
554 global_reservations_.Close();
555}
556
557/// Test that queries and clients can be registered and deregistered by concurrent
558/// threads.

Callers

nothing calls this directly

Calls 15

bindFunction · 0.85
moveFunction · 0.85
discard_resultFunction · 0.85
maxFunction · 0.85
SubstituteFunction · 0.85
InitRootTrackerMethod · 0.80
GetChildReservationsMethod · 0.80
CreatePageMethod · 0.80
DestroyPageMethod · 0.80
DeregisterClientMethod · 0.80
TransferBufferMethod · 0.80
codeMethod · 0.80

Tested by

no test coverage detected