fix oss sandcastle job

Summary:
My recent stack of diffs introduced a handful of oss bugs :(.

1. VLOG_EVERY_MS is an internal function.
fix: added an oss stub version

2. Forgot to add QsfpCache.cpp to CMakeLists.txt
fix: add it

3. vanilla gcc5.4 has a bug where it can't handle lambdas like:
  [this]() {
    memberFn();
  }
and instead you need to write like:
  [this]() {
    this->memberFn();
  }

fix: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67274 says it should
be fixed in gcc7, but I added 'this->' in the meantime.

4. The base fb303.thrift file we have in open source does not declare
aliveSince, which we now call on qsfp_service.

fix: add it to fb303.thrift

Reviewed By: ninas

Differential Revision: D6627705

fbshipit-source-id: 2100783df1ea0e9af0fed66e4e24ef85b71fc7e9
This commit is contained in:
Alex Eckert 2017-12-22 09:20:44 -08:00 committed by Facebook Github Bot
parent f18128537f
commit c684fed90a
2 changed files with 23 additions and 2 deletions

View File

@ -38,7 +38,7 @@ service FacebookService {
/**
* Gets the status of this service
*/
fb_status getStatus(),
fb_status getStatus() (priority='IMPORTANT'),
/**
* Gets the counters for this service
@ -50,4 +50,9 @@ service FacebookService {
*/
oneway void shutdown(),
} (priority = 'IMPORTANT')
/**
* Returns the unix time that the server has been running since
*/
i64 aliveSince() (priority = 'IMPORTANT'),
}

16
common/logging/logging.h Normal file
View File

@ -0,0 +1,16 @@
/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
// TODO: actually implement this
#ifndef VLOG_EVERY_MS
#define VLOG_EVERY_MS(verboselevel, ms) \
VLOG(verboselevel)
#endif