Skip to content

Commit

Permalink
Merge pull request #551 from v3io/development
Browse files Browse the repository at this point in the history
dev -> master
  • Loading branch information
dinal authored Oct 26, 2020
2 parents 7176632 + 1734a6d commit 3bfc841
Show file tree
Hide file tree
Showing 10 changed files with 784 additions and 637 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1037,3 +1037,4 @@ docker run \
[Apache 2](LICENSE)



9 changes: 7 additions & 2 deletions backends/tsdb/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ package tsdb
import (
"fmt"
"sort"
"strings"
"time"

"github.com/nuclio/logger"
Expand Down Expand Up @@ -192,8 +193,12 @@ func (a *tsdbAppender) Add(frame frames.Frame) error {
}
} else {
err := a.appender.AddFast(metric.ref, tarray[i], values[idx][i])
if err != nil {
return errors.Wrap(err, "failed to AddFast")
if err != nil && strings.Contains(err.Error(), "metric not found") {
//retry with Add in case ref was evicted from cache
metric.ref, err = a.appender.Add(metric.lset, tarray[i], values[idx][i])
if err != nil {
return errors.Wrap(err, "failed to AddFast and Add")
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions clients/py/v3io_frames/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def Client(address='', data_url='', container='', user='',
----------
A new `Client` object
"""
address = address or environ.get('V3IO_FRAMESD')
if not address:
raise ValueError('empty address')
if not (address.startswith("grpc://") or address.startswith("https://") or address.startswith("http://")):
address = "grpc://" + address
protocol = urlparse(address).scheme or 'grpc'
Expand Down
5 changes: 0 additions & 5 deletions clients/py/v3io_frames/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from os import environ

import pandas as pd

from . import frames_pb2 as fpb
Expand Down Expand Up @@ -183,9 +181,6 @@ def __init__(self, address, session, persist_connection=False,
----------
A new `Client` object
"""
address = address or environ.get('V3IO_FRAMESD')
if not address:
raise ValueError('empty address')
self.address = self._fix_address(address)
self.session = session
self._persist_connection = persist_connection
Expand Down
696 changes: 375 additions & 321 deletions clients/py/v3io_frames/frames_pb2.py

Large diffs are not rendered by default.

Loading

0 comments on commit 3bfc841

Please sign in to comment.