Bugs (fixed): * Assert crash in MDSource.h "Marketdata heartbeats are bad..." Cause: The MD cleanup procedure, which is supposed to delete md files from shared memory (from previous runs), wasn't deleting anything. The file globbing pattern it was using (to determine which files to delete) never produced any matches because it had the wrong prefix. As a result, market data would often be loaded with a stale heartbeat timestamp from a previous run. Note: This occurred as a side effect of making the shared memory prefix configurable when we ported the api server over to Linux (so the api server and sparkd could run on the same container/machine whilst maintaining independent shared memory files).
24 lines
497 B
C++
24 lines
497 B
C++
#ifndef NO_CPP0X
|
|
#include "MemorySegmentUtils.h"
|
|
#include "lib/config/config.h"
|
|
#include "lib/config/protos/market_data.pb.h"
|
|
|
|
using namespace std;
|
|
|
|
#ifndef SHARED_MEMORY_PREFIX
|
|
#define SHARED_MEMORY_PREFIX "sparkd"
|
|
#endif
|
|
|
|
namespace bts {
|
|
namespace md {
|
|
|
|
bool enable_depth(const string &, SecurityType) {
|
|
return true;
|
|
// return type == api::SECURITYTYPE_FUTURE || type ==
|
|
// api::SECURITYTYPE_SPREAD || type == api::SECURITYTYPE_SYNTHETIC;
|
|
}
|
|
|
|
} // namespace md
|
|
} // namespace bts
|
|
#endif
|