Skip to content

Commit 0126a0e

Browse files
authored
fix: remove the watermarks (#1313)
* remove the watermarks Removing the watermarks allows data not to be stuck at the last transform so that data doesn’t get stuck due to the watermarks. * fix: remove the watermarks
1 parent a461c17 commit 0126a0e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/table.ts

+1
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);
751751
let userCanceled = false;
752752
const userStream = new PassThrough({
753753
objectMode: true,
754+
readableHighWaterMark: 0,
754755
transform(row, _encoding, callback) {
755756
if (userCanceled) {
756757
callback();

test/readrows.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ describe('Bigtable/ReadRows', () => {
223223
});
224224

225225
// TODO: enable after https://github.com/googleapis/nodejs-bigtable/issues/1286 is fixed
226-
it.skip('should be able to stop reading from the read stream when reading asynchronously', function (done) {
226+
it('should be able to stop reading from the read stream when reading asynchronously', function (done) {
227227
if (process.platform === 'win32') {
228228
this.timeout(60000); // it runs much slower on Windows!
229229
}
@@ -252,6 +252,7 @@ describe('Bigtable/ReadRows', () => {
252252
// Transform stream
253253
const transform = new Transform({
254254
objectMode: true,
255+
writableHighWaterMark: 0,
255256
transform: (row, _encoding, callback) => {
256257
setTimeout(() => {
257258
callback(null, row);

0 commit comments

Comments
 (0)