Skip to content

Commit

Permalink
fix: Log aerospike sink error and increase batch timeout (#2336)
Browse files Browse the repository at this point in the history
  • Loading branch information
chubei authored Jan 22, 2024
1 parent 5e42c57 commit 1f95b1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dozer-sink-aerospike/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use dozer_core::{
};
use dozer_types::errors::internal::BoxedError;
use dozer_types::geo::{Coord, Point};
use dozer_types::log::info;
use dozer_types::log::{error, info};
use dozer_types::ordered_float::OrderedFloat;
use dozer_types::types::DozerPoint;
use dozer_types::{
Expand Down Expand Up @@ -117,6 +117,7 @@ impl Client {
as_config_init(config.as_mut_ptr());
config.assume_init()
};
config.policies.batch.base.total_timeout = 10000;
unsafe {
// The hosts string will be copied, so pass it as `as_ptr` so the original
// gets deallocated at the end of this block
Expand Down Expand Up @@ -386,7 +387,9 @@ struct AerospikeSinkWorker {
impl AerospikeSinkWorker {
fn run(&mut self) {
while let Ok(op) = self.receiver.recv() {
let _ = self.process_impl(op);
if let Err(e) = self.process_impl(op) {
error!("Error processing operation: {}", e);
}
}
}

Expand Down

0 comments on commit 1f95b1f

Please sign in to comment.