NCBI C++ ToolKit
cass_processor_base.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: cass_processor_base.cpp 102524 2024-05-22 14:10:48Z satskyse $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Sergey Satskiy
27  *
28  * File Description: base class for processors which may generate cassandra
29  * fetches
30  *
31  */
32 
33 #include <ncbi_pch.hpp>
34 
36 #include <corelib/ncbidiag.hpp>
37 
38 #include "cass_processor_base.hpp"
39 #include "pubseq_gateway.hpp"
40 
41 
43  m_Canceled(false),
44  m_Unlocked(false),
45  // e100_Continue means that the processor has not updated the status yet
46  // explicitly
47  m_Status(CRequestStatus::e100_Continue)
48 {}
49 
50 
52  shared_ptr<CPSGS_Request> request,
53  shared_ptr<CPSGS_Reply> reply,
54  TProcessorPriority priority) :
55  m_Canceled(false),
56  m_Unlocked(false),
57  // e100_Continue means that the processor has not updated the status yet
58  // explicitly
59  m_Status(CRequestStatus::e100_Continue)
60 {
63  IPSGS_Processor::m_Priority = priority;
64 }
65 
66 
68 {
70 }
71 
72 
74 {
75  // The other processors may wait on a lock
77 
78  m_Canceled = true;
79  CancelLoaders();
80 }
81 
82 
83 NCBI_PARAM_DECL(int, CASSANDRA_PROCESSOR, ERROR_RATE);
84 NCBI_PARAM_DEF(int, CASSANDRA_PROCESSOR, ERROR_RATE, 0);
85 
87 {
88  // It is safe to unlock the request many times
90 
91  if (!AreAllFinishedRead() || !IsMyNCBIFinished()) {
92  // Cannot really report finish because there could be still not
93  // finished cassandra fetches. In this case there will be an async
94  // event which will lead to another SignalFinishProcessing() call and
95  // it will go further.
96  return;
97  }
98 
99  static int error_rate = NCBI_PARAM_TYPE(CASSANDRA_PROCESSOR, ERROR_RATE)::GetDefault();
100  if ( error_rate > 0 && !m_FinishSignalled ) {
101  static int error_counter = 0;
102  if ( ++error_counter >= error_rate ) {
103  error_counter = 0;
105  }
106  }
107 
109  // That means the processor has not updated the status explicitly and
110  // it actually means everything is fine, i.e. 200.
111  // Otherwise the processor would update the status explicitly using the
112  // UpdateOverallStatus() method.
113  // So to report the finishing status properly in response to the
114  // GetStatus() call, the status needs to be updated to 200
116  }
118 }
119 
120 
122 {
123  if (!m_Unlocked) {
124  m_Unlocked = true;
127  }
128  }
129 }
130 
131 
133 {
134  if (m_Canceled)
136 
139 
142 
143  // 300 never actually happens
144  if (m_Status < 300)
146  if (m_Status < 500) {
149  }
151  }
153 }
154 
155 
157 {
158  if (!m_FetchDetails.empty()) {
159  for (const auto & details: m_FetchDetails) {
160  if (details) {
161  if (details->Canceled()) {
162  } else {
163  if (details->ReadFinished()) {
164  } else {
165  details->GetLoader()->Wait();
166  }
167  }
168  } else {
169  }
170  }
171  }
172 }
173 
175 {
176  string ret;
177  ret = "Total fetches: " + to_string(m_FetchDetails.size());
178 
179  if (!m_FetchDetails.empty()) {
180  for (const auto & details: m_FetchDetails) {
181  ret += "\n";
182  if (details) {
183  ret += details->Serialize() + " ";
184  if (details->Canceled()) {
185  ret += "Canceled";
186  } else {
187  if (details->ReadFinished()) {
188  ret += "Read has finished";
189  } else {
190  ret += "Read has not finished";
191  }
192  }
193  } else {
194  ret += "No more details available";
195  }
196  }
197  }
198  return ret;
199 }
200 
201 
203 {
204  for (const auto & details: m_FetchDetails) {
205  if (details) {
206  if (!details->Canceled()) {
207  if (!details->ReadFinished()) {
208  return false;
209  }
210  }
211  }
212  }
213  return true;
214 }
215 
216 
217 void call_on_data_cb(void * user_data)
218 {
220  proc->CallOnData();
221 }
222 
223 
225 {
226  auto p = IPSGS_Processor::m_Reply->GetDataReadyCB();
227  p->OnData();
228 }
229 
230 
231 void call_processor_process_event_cb(void * user_data)
232 {
234  proc->ProcessEvent();
235 }
236 
237 
239 {
240  for (auto & loader: m_FetchDetails) {
241  if (loader) {
242  if (!loader->ReadFinished()) {
243  loader->Cancel();
244  loader->RemoveFromExcludeBlobCache();
245 
246  // Imitate the Cassandra data ready event. This will eventually
247  // lead to a pending operation Peek() call which in turn calls
248  // Wait() for the loader. The Wait() return value should say in
249  // this case that there will be nothing else.
250  // However, do not do that synchronously. Do the call in the
251  // next iteration of libuv loop associated with the processor
252  // so that it is safe even if Cancel() is done from another
253  // loop
254  PostponeInvoke(call_on_data_cb, (void*)(this));
255  }
256  }
257  }
258 
259  // Sometimes there are no loaders which have not finished or the OnData()
260  // does not lead to a process event call of the processor due to a data
261  // trigger.
262  // This may lead to a not called SignalFinishProcessing() for a processor.
263  // On the other hand the ProcessEvent() is innocent in terms of data
264  // processing however will check the cancel status as needed.
265  // So shedule ProcessEvent() for later.
267 }
268 
269 
270 void
272 {
273  m_Status = max(status, m_Status);
274 }
275 
276 
277 static string kCassandra = "cassandra";
278 
279 bool
281  shared_ptr<CPSGS_Request> request) const
282 {
283  // CXX-11549: for the time being the processor name does not participate in
284  // the decision. Only the hardcoded "cassandra" is searched in
285  // the enable/disable list.
286  // Also, what list is consulted depends on a configuration file
287  // setting which tells whether the cassandra processors are
288  // enabled or not. This leads to a nice case when looking at the
289  // request it is impossible to say if a processor was enabled or
290  // disabled at the time of request if enable/disable options are
291  // not in the request.
292 
293  auto * app = CPubseqGatewayApp::GetInstance();
294  bool enabled = app->GetCassandraProcessorsEnabled();
295 
296  if (enabled) {
297  for (const auto & dis_processor :
298  request->GetRequest<SPSGS_RequestBase>().m_DisabledProcessors) {
299  if (NStr::CompareNocase(dis_processor, kCassandra) == 0) {
300  return false;
301  }
302  }
303  } else {
304  for (const auto & en_processor :
305  request->GetRequest<SPSGS_RequestBase>().m_EnabledProcessors) {
306  if (NStr::CompareNocase(en_processor, kCassandra) == 0) {
307  return true;
308  }
309  }
310  }
311 
312  return enabled;
313 }
314 
315 
316 
320  const string & seq_id)
321 {
322  SCass_BlobId blob_id(sat, sat_key);
323 
324  if (blob_id.MapSatToKeyspace()) {
325  // All good, the translation has been done successfully
326  return blob_id;
327  }
328 
329  // No translation => send an error message
330  auto * app = CPubseqGatewayApp::GetInstance();
331  size_t item_id = IPSGS_Processor::m_Reply->GetItemId();
332  string msg = "Unknown satellite number " + to_string(blob_id.m_Sat) +
333  " for bioseq info with seq_id '" +
334  seq_id + "'";
335  app->GetCounters().Increment(this,
337 
338  IPSGS_Processor::m_Reply->PrepareBlobPropMessage(
341  IPSGS_Processor::m_Reply->PrepareBlobPropCompletion(item_id, GetName(), 2);
342 
344  PSG_ERROR(msg);
345 
347 
348  // Return invalid blob id
349  return SCass_BlobId();
350 }
351 
352 
353 bool CPSGS_CassProcessorBase::IsTimeoutError(const string & msg) const
354 {
355  string msg_lower = msg;
356  NStr::ToLower(msg_lower);
357 
358  return msg_lower.find("timeout") != string::npos;
359 }
360 
361 
363 {
365 }
366 
367 
369 {
370  return (severity == eDiag_Error ||
371  severity == eDiag_Critical ||
372  severity == eDiag_Fatal);
373 }
374 
375 
378  CRequestStatus::ECode status,
379  int code,
380  EDiagSev severity,
381  const string & message,
382  EPSGS_LoggingFlag logging_flag,
383  EPSGS_StatusUpdateFlag status_update_flag)
384 {
385  // Note: the 'code' may come from cassandra error handlers and from the PSG
386  // internal logic code. It is safe to compare the codes against particular
387  // values because they range quite different. The Cassandra codes start
388  // from 2000 and the PSG codes start from 300
389 
391  string message_prefix;
392  if (fetch_details != nullptr) {
393  fetch_type = fetch_details->GetFetchType();
394  message_prefix = "Fetch context: " + fetch_details->Serialize() + "\n";
395  }
396 
397 
398  // It could be a message or an error
399  bool is_error = IsError(severity);
400 
401  if (logging_flag == ePSGS_NeedLogging) {
402  if (is_error) {
403  PSG_ERROR(message_prefix + message);
404  } else {
405  PSG_WARNING(message_prefix + message);
406  }
407  }
408 
409  if (m_Request->NeedTrace()) {
410  m_Reply->SendTrace(message_prefix +
411  "Error detected. Status: " + to_string(status) +
412  " Code: " + to_string(code) +
413  " Severity: " + string(CNcbiDiag::SeverityName(severity)) +
414  " Message: " + message,
415  m_Request->GetStartTimestamp());
416  }
417 
418  auto * app = CPubseqGatewayApp::GetInstance();
419  if (IsTimeoutError(code)) {
420  app->GetCounters().Increment(this,
422  if (status_update_flag == ePSGS_NeedStatusUpdate) {
424  }
426  }
427 
428  if (status == CRequestStatus::e404_NotFound) {
429  switch (fetch_type) {
431  app->GetCounters().Increment(this,
433  break;
435  app->GetCounters().Increment(this,
437  break;
439  app->GetCounters().Increment(this,
441  break;
443  app->GetCounters().Increment(this,
445  break;
446  case ePSGS_TSEChunkFetch:
447  app->GetCounters().Increment(this,
449  break;
451  app->GetCounters().Increment(this,
453  break;
454  case ePSGS_Si2csiFetch:
455  app->GetCounters().Increment(this,
457  break;
459  app->GetCounters().Increment(this,
461  break;
463  app->GetCounters().Increment(this,
465  break;
467  app->GetCounters().Increment(this,
469  break;
471  app->GetCounters().Increment(this,
473  break;
474  case ePSGS_UnknownFetch:
475  break;
476  }
477 
478  if (status_update_flag == ePSGS_NeedStatusUpdate) {
480  }
482  }
483 
484  if (is_error) {
485  if (fetch_type != ePSGS_UnknownFetch) {
486  app->GetCounters().Increment(this,
488  }
489  if (status_update_flag == ePSGS_NeedStatusUpdate) {
490  UpdateOverallStatus(status);
491  }
492  }
493 
494  return status;
495 }
496 
497 
499 {
500  if (m_WhoAmIRequest.get() == nullptr)
501  return true; // Not even started
502 
503  return m_WhoAmIRequest->GetResponseStatus() != EPSG_MyNCBIResponseStatus::eInProgress;
504 }
505 
506 
507 
508 extern mutex g_MyNCBICacheLock;
509 
512  TMyNCBIErrorCB error_cb)
513 {
514  if (m_UserName.has_value()) {
515  // It has already been retrieved one way or another.
516  // There could be only one user per request so no need to do anything
517  return ePSGS_FoundInOKCache;
518  }
519 
520  bool new_client = m_Request->GetIncludeHUP().has_value();
521  if (new_client) {
522  if (!m_Request->GetIncludeHUP().value()) {
523  // The include_hup explicitly tells 'no'
526  }
527  }
528 
529 
530  // Check for the cookie
531  m_MyNCBICookie = IPSGS_Processor::m_Request->GetWebCubbyUser();
532  if (!m_MyNCBICookie.has_value()) {
534  return ePSGS_CookieNotPresent;
535  }
536 
537  // Cookie is here. Check all three caches (error, not found and ok)
538 
539  string cookie = m_MyNCBICookie.value();
540  bool need_trace = m_Request->NeedTrace();
541  auto app = CPubseqGatewayApp::GetInstance();
542 
543  // Since there are 3 caches to check, that should be done under a mutex
544  g_MyNCBICacheLock.lock();
545 
546  // Check first the error cache
547  auto err_cache_ret = app->GetMyNCBIErrorCache()->GetError(cookie);
548  if (err_cache_ret.has_value()) {
549  g_MyNCBICacheLock.unlock();
550 
551  // Found in error cache; invoke a callback for errors and return saying
552  // no further actions are required.
553  if (need_trace) {
554  m_Reply->SendTrace("MyNCBI cookie was found in the error cache: " +
555  cookie + ". Call the error callback right away.",
556  m_Request->GetStartTimestamp());
557  }
558  error_cb(cookie, err_cache_ret.value().m_Status,
559  err_cache_ret.value().m_Code,
560  err_cache_ret.value().m_Severity,
561  err_cache_ret.value().m_Message);
562 
564  }
565 
566  auto not_found_cache_ret = app->GetMyNCBINotFoundCache()->IsNotFound(cookie);
567  if (not_found_cache_ret) {
568  g_MyNCBICacheLock.unlock();
569 
570  // Found in not found cache; invoke a callback for not found and return saying
571  // no further actions are required.
572  if (need_trace) {
573  m_Reply->SendTrace("MyNCBI cookie was found in the not found cache: " +
574  cookie + ". Call the error callback right away.",
575  m_Request->GetStartTimestamp());
576  }
577 
578  // Error callback is used for not found case as well. The 404 status is
579  // the differentiating factor
580  error_cb(cookie, CRequestStatus::e404_NotFound,
581  -1, eDiag_Error, "");
582 
584  }
585 
586  // Check the OK cache. If found then the item can be in READY or INPROGRESS
587  // state.
588 
589  // Note: the passed callbacks are used for the wait list if the request is
590  // in progress. The callbacks are the same for both cases:
591  // - called by my ncbi wrapper in responce to the request
592  // - called from the cache when a wait list is checked
593  // In both cases callbacks are called asynchronously.
594  auto user_info = app->GetMyNCBIOKCache()->GetUserInfo(this, cookie,
595  data_cb, error_cb);
596  g_MyNCBICacheLock.unlock();
597 
598  if (user_info.has_value()) {
599  if (user_info.value().m_Status == SMyNCBIOKCacheItem::ePSGS_Ready) {
600  // The data are ready to use
601  if (need_trace) {
602  m_Reply->SendTrace("MyNCBI user info found in OK cache "
603  "in Ready state for cookie: " + cookie +
604  ". User name: " + user_info.value().m_UserInfo.username,
605  m_Request->GetStartTimestamp());
606  }
607 
608  m_UserName = user_info.value().m_UserInfo.username;
609  return ePSGS_FoundInOKCache;
610  }
611 
612  // Here: status == SMyNCBIOKCacheItem::ePSGS_InProgress
613  // That means the caller is put into a wait list. Thus there is nothing
614  // else to do; just wait for a callback
615  if (need_trace) {
616  m_Reply->SendTrace("MyNCBI cookie found in OK cache "
617  "in InProgress state for cookie: " + cookie +
618  ". We are in a wait list now.",
619  m_Request->GetStartTimestamp());
620  }
621  return ePSGS_AddedToWaitlist;
622  }
623 
624 
625  // Cookie has not been found in any of the caches so initiate a my ncbi request
626  uv_loop_t * loop = app->GetUVLoop();
627 
628  if (need_trace) {
629  m_Reply->SendTrace("Initiating MyNCBI request for cookie: " + cookie,
630  m_Request->GetStartTimestamp());
631  }
632 
634  app->GetMyNCBIFactory()->CreateWhoAmI(loop, cookie,
635  CMyNCBIDataCallback(this, data_cb, cookie),
636  CMyNCBIErrorCallback(this, error_cb, cookie));
637  return ePSGS_RequestInitiated;
638 }
639 
640 
642 {
643  auto app = CPubseqGatewayApp::GetInstance();
644  app->GetCounters().Increment(this,
646 
647  string err_msg = GetName() + " processor: ";
648  if (IPSGS_Processor::m_Request->GetIncludeHUP().has_value()) {
649  err_msg += "HUP retrieval is allowed (explicitly set to 'yes') but auth token is missing";
650  } else {
651  err_msg += "HUP retrieval is allowed (implicitly) but auth token is missing";
652  }
653 
654  IPSGS_Processor::m_Reply->PrepareProcessorMessage(
655  IPSGS_Processor::m_Reply->GetItemId(), GetName(),
659  PSG_NOTE(err_msg);
660 }
661 
662 
664 {
665  auto app = CPubseqGatewayApp::GetInstance();
666  app->GetCounters().Increment(this,
668 
669  string err_msg = GetName() + " processor: ";
670  if (IPSGS_Processor::m_Request->GetWebCubbyUser().has_value()) {
671  err_msg += "HUP retrieval is disallowed but auth token is present";
672  } else {
673  err_msg += "HUP retrieval is disallowed and auth token is missing";
674  }
675 
676  IPSGS_Processor::m_Reply->PrepareProcessorMessage(
677  IPSGS_Processor::m_Reply->GetItemId(), GetName(),
681  PSG_NOTE(err_msg);
682 }
683 
684 
686  const string & my_ncbi_message)
687 {
688  auto app = CPubseqGatewayApp::GetInstance();
689  app->GetCounters().Increment(this,
691 
692  string err_msg = GetName() + " processor received an error from MyNCBI "
693  "while checking permissions for a Cassandra secure keyspace. Message: " +
694  my_ncbi_message;
695  IPSGS_Processor::m_Reply->PrepareProcessorMessage(
696  IPSGS_Processor::m_Reply->GetItemId(), GetName(),
697  err_msg, status,
699  UpdateOverallStatus(status);
700  PSG_ERROR(err_msg);
701 }
702 
703 
705 {
706  auto app = CPubseqGatewayApp::GetInstance();
707  app->GetCounters().Increment(this,
709 
710  string err_msg = GetName() + " processor received a not found report from MyNCBI "
711  "while checking permissions for a Cassandra secure keyspace.";
712  IPSGS_Processor::m_Reply->PrepareProcessorMessage(
713  IPSGS_Processor::m_Reply->GetItemId(), GetName(),
717  PSG_NOTE(err_msg);
718 }
719 
720 
722 {
723  auto app = CPubseqGatewayApp::GetInstance();
724  app->GetCounters().Increment(this,
726 
727  string err_msg = GetName() +
728  " processor failed to get a Cassandra connection because of an unknown reason.";
729  IPSGS_Processor::m_Reply->PrepareProcessorMessage(
730  IPSGS_Processor::m_Reply->GetItemId(), GetName(),
734  PSG_ERROR(err_msg);
735 }
736 
737 
739 {
740  auto app = CPubseqGatewayApp::GetInstance();
741  app->GetCounters().Increment(this,
743 
744  string err_msg = GetName() +
745  " processor failed to get a Cassandra connection. Message: " + message;
746  IPSGS_Processor::m_Reply->PrepareProcessorMessage(
747  IPSGS_Processor::m_Reply->GetItemId(), GetName(),
751  PSG_ERROR(err_msg);
752 }
753 
754 
756 {
757  // It is possible that:
758  // - the processor is destroyed because of the abrupt connection dropping and
759  // - the processor has initiated a myncbi request or
760  // - in the wait list of the my ncbi reply
761  // So the my NCBI cache must be cleaned
762 
763  // If cookie is present => it is a waiter or initiator
764  if (!m_MyNCBICookie.has_value()) {
765  // The processor did not do anything with my NCBI
766  return;
767  }
768 
769  auto app = CPubseqGatewayApp::GetInstance();
770  if (m_WhoAmIRequest.get() == nullptr) {
771  // Possibly this is a processor in the wait list
772  app->GetMyNCBIOKCache()->ClearWaitingProcessor(m_MyNCBICookie.value(),
773  this);
774  } else {
775  // Possibly this is a processor which initiated the request
776  app->GetMyNCBIOKCache()->ClearInitiatedRequest(m_MyNCBICookie.value());
777  }
778 }
779 
780 
782 {
783  auto app = CPubseqGatewayApp::GetInstance();
784  app->GetCounters().Increment(this,
786 
787  string err_msg = GetName() + " processor: user '" + user_name +
788  "' is not authorized to access "
789  "Cassandra secure satellite.";
790  IPSGS_Processor::m_Reply->PrepareProcessorMessage(
791  IPSGS_Processor::m_Reply->GetItemId(), GetName(),
795  PSG_ERROR(err_msg);
796 }
797 
mutex g_MyNCBICacheLock
static string kCassandra
NCBI_PARAM_DECL(int, CASSANDRA_PROCESSOR, ERROR_RATE)
void call_on_data_cb(void *user_data)
void call_processor_process_event_cb(void *user_data)
NCBI_PARAM_DEF(int, CASSANDRA_PROCESSOR, ERROR_RATE, 0)
const string kCassandraProcessorEvent
int32_t TSatKey
Definition: record.hpp:61
int16_t TSat
Definition: record.hpp:60
virtual string Serialize(void) const =0
EPSGS_DbFetchType GetFetchType(void) const
Definition: cass_fetch.hpp:92
CRequestStatus::ECode CountError(CCassFetch *fetch_details, CRequestStatus::ECode status, int code, EDiagSev severity, const string &message, EPSGS_LoggingFlag logging_flag, EPSGS_StatusUpdateFlag status_update_flag)
void UpdateOverallStatus(CRequestStatus::ECode status)
bool IsCassandraProcessorEnabled(shared_ptr< CPSGS_Request > request) const
CRequestStatus::ECode m_Status
virtual void Cancel(void)
The infrastructure request to cancel processing.
bool IsError(EDiagSev severity) const
SCass_BlobId TranslateSatToKeyspace(CBioseqInfoRecord::TSat sat, CBioseqInfoRecord::TSatKey sat_key, const string &seq_id)
EPSGS_MyNCBILookupResult PopulateMyNCBIUser(TMyNCBIDataCB data_cb, TMyNCBIErrorCB error_cb)
void ReportSecureSatUnauthorized(const string &user_name)
list< unique_ptr< CCassFetch > > m_FetchDetails
string GetVerboseFetches(void) const
shared_ptr< CPSG_MyNCBIRequest_WhoAmI > m_WhoAmIRequest
bool AreAllFinishedRead(void) const
IPSGS_Processor::EPSGS_Status GetStatus(void) override
Tells the processor status (if it has finished or in progress)
optional< string > m_MyNCBICookie
void ReportMyNCBIError(CRequestStatus::ECode status, const string &my_ncbi_message)
bool IsTimeoutError(const string &msg) const
static CPubseqGatewayApp * GetInstance(void)
virtual string GetName(void) const =0
Tells the processor name (used in logging and tracing)
shared_ptr< CPSGS_Reply > m_Reply
EPSGS_Status
The GetStatus() method returns a processor current status.
void PostponeInvoke(CPSGS_UvLoopBinder::TProcessorCB cb, void *user_data)
The provided callback will be called from the libuv loop assigned to the processor.
void SignalFinishProcessing(void)
A processor should call this method when it decides that there is nothing else to be done.
shared_ptr< CPSGS_Request > m_Request
TProcessorPriority m_Priority
#define false
Definition: bool.h:36
static const char * proc
Definition: stats.c:21
static const char * SeverityName(EDiagSev sev)
Get a common symbolic name for the severity levels.
EDiagSev
Severity level for the posted diagnostics.
Definition: ncbidiag.hpp:650
@ eDiag_Error
Error message.
Definition: ncbidiag.hpp:653
@ eDiag_Warning
Warning message.
Definition: ncbidiag.hpp:652
@ eDiag_Fatal
Fatal error – guarantees exit(or abort)
Definition: ncbidiag.hpp:655
@ eDiag_Critical
Critical error message.
Definition: ncbidiag.hpp:654
#define NCBI_PARAM_TYPE(section, name)
Generate typename for a parameter from its {section, name} attributes.
Definition: ncbi_param.hpp:149
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
Definition: ncbistr.cpp:219
static string & ToLower(string &str)
Convert string to lower case – string& version.
Definition: ncbistr.cpp:405
function< void(const string &cookie, CPSG_MyNCBIRequest_WhoAmI::SUserInfo info)> TMyNCBIDataCB
function< void(const string &cookie, CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)> TMyNCBIErrorCB
Defines NCBI C++ diagnostic APIs, classes, and macros.
T max(T x_, T y_)
#define PSG_ERROR(message)
#define PSG_NOTE(message)
#define PSG_WARNING(message)
int TProcessorPriority
EPSGS_StatusUpdateFlag
@ ePSGS_NeedStatusUpdate
@ ePSGS_BlobBySatSatKeyFetch
@ ePSGS_BioseqInfoFetch
@ ePSGS_UnknownFetch
@ ePSGS_SplitHistoryFetch
@ ePSGS_AnnotationFetch
@ ePSGS_Si2csiFetch
@ ePSGS_AnnotationBlobFetch
@ ePSGS_TSEChunkFetch
@ ePSGS_BlobBySeqIdFetch
@ ePSGS_PublicCommentFetch
@ ePSGS_AccVerHistoryFetch
@ ePSGS_IPGResolveFetch
@ ePSGS_NoWebCubbyUserCookieError
@ ePSGS_SecureSatUnauthorized
@ ePSGS_MyNCBIError
@ ePSGS_MyNCBINotFound
@ ePSGS_UnknownResolvedSatellite
@ ePSGS_CassConnectionError
@ ePSGS_NeedLogging
Defines CRequestStatus class for NCBI C++ diagnostic API.
CBioseqInfoRecord::TSat m_Sat
bool MapSatToKeyspace(void)
vector< string > m_DisabledProcessors
vector< string > m_EnabledProcessors
Definition: inftrees.h:24
Modified on Sun Jul 21 04:13:55 2024 by modify_doxy.py rev. 669887