100% CPU Usage on Bookies

We setup two new clusters with replication and we were seeing really bad performance when reading from backlog.
We then discovered some bookkeepers were at 100% CPU usage but apparently doing nothing, almost no Disk or Net IO.
I then proceeded to downgrading one of the bookkeeper to 1.14 and it seems to be working just fine.
Any ideas of what could be going on?
System configuration
Pulsar version: 1.15.2

Ok, there have been several changes in the Bookie RocksDB index that got picked in 1.15. At the same time we haven't updated the cluster settings in conf/bookkeeper.conf.
These are the new config settings with their default values:
dbStorage_rocksDB_writeBufferSizeMB=64
dbStorage_rocksDB_sstSizeInMB=64
dbStorage_rocksDB_blockSize=65536
dbStorage_rocksDB_bloomFilterBitsPerKey=10
dbStorage_rocksDB_blockCacheSize=268435456 # 256 MBytes
dbStorage_rocksDB_numLevels=-1
dbStorage_rocksDB_numFilesInLevel0=4
dbStorage_rocksDB_maxSizeInLevel1MB=256

In production we're using these values, you can adjust the memory size to your machines.
# This is where the data is stored before flushing. This will come from JVM direct memory.
dbStorage_writeCacheMaxSizeMb=8192

# Read-ahead cache to speed up backlog draining. From direct memory
dbStorage_readAheadCacheMaxSizeMb=4096

# Give 4GBytes to RocksDB block cache. Ideally this cache should be big enough
# to contain most of the locations index data/bookkeeper/ledgers/current/locations/
dbStorage_rocksDB_blockCacheSize=4294967296

In particular, I believe the blockCacheSize is what is affecting the performance in your case.
I'll update the conf files to include the new config variables.

Hmm tried those configs, still seeing 100% cpu usage.

How big is the directory DB in data/bookkeeper/ledgers/current/locations/ ? Are you using SSDs or HDDs?
Can you enable bookie stats?
For example, to report stats to SLF4J logger, add this to bookkeeper.conf :
statsProviderClass=org.apache.bookkeeper.stats.CodahaleMetricsProvider
codahaleStatsSlf4jEndpoint=stats

This should report the stats every 1 minute in the bookie log file.
One other thing you can try is to reduce the read-ahead cache, even try to disable it:
dbStorage_readAheadCacheBatchSize=0

I might encounter the same issue with the latest master branch build running on SAS disk servers with the default bookkeepr configuration.
Some bookies exhaust full of one cpu core with following stack:
"BookieReadThread-3181-9-1" #20 prio=5 os_prio=0 tid=0x00007f26fd35d800 nid=0x56ef runnable [0x00007f25a3e8e000]
java.lang.Thread.State: RUNNABLE
at org.rocksdb.RocksDB.get(Native Method)
at org.rocksdb.RocksDB.get(RocksDB.java:656)
at org.apache.bookkeeper.bookie.storage.ldb.KeyValueStorageRocksDB.get(KeyValueStorageRocksDB.java:202)
at org.apache.bookkeeper.bookie.storage.ldb.EntryLocationIndex.getLocation(EntryLocationIndex.java:82)
at org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage.fillReadAheadCache(DbLedgerStorage.java:429)
at org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage.getEntry(DbLedgerStorage.java:404)
at org.apache.bookkeeper.bookie.LedgerDescriptorImpl.readEntry(LedgerDescriptorImpl.java:90)
at org.apache.bookkeeper.bookie.Bookie.readEntry(Bookie.java:1080)
at org.apache.bookkeeper.proto.ReadEntryProcessor.processPacket(ReadEntryProcessor.java:72)
at org.apache.bookkeeper.proto.PacketProcessorBase.safeRun(PacketProcessorBase.java:82)
at org.apache.bookkeeper.util.SafeRunnable.run(SafeRunnable.java:31)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)
I looked at the Bookkeeper's code a little bit, it seems the org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage.fillReadAheadCache(long, long, long) is not such efficient that it looks up every entry's location from rocksdb other than using rocksdb's iterator interface to retrieve the locations in batch behavior.
Can I disable rocksdb?
Thanks

I modified perf consumer to print out throughput every second:
2016-11-16 17:16:12,415 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 999.650  msg/s -- 1.952 Mbit/s
2016-11-16 17:16:13,416 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:14,416 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:15,416 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:16,417 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:17,417 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:18,418 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 999.642  msg/s -- 1.952 Mbit/s
2016-11-16 17:16:19,418 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:20,418 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:21,419 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:22,419 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:23,420 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:24,420 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 999.599  msg/s -- 1.952 Mbit/s
2016-11-16 17:16:25,420 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:26,421 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:27,421 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:28,421 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:29,422 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:30,422 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 999.589  msg/s -- 1.952 Mbit/s
2016-11-16 17:16:31,423 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:32,423 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:33,423 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:34,424 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:35,424 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 0.000  msg/s -- 0.000 Mbit/s
2016-11-16 17:16:36,425 - INFO  - [main:PerformanceConsumer@263] - Throughput received: 999.622  msg/s -- 1.952 Mbit/s

I also tried to increased dbStorage_rocksDB_blockCacheSize to 512M, the throughput still the same and the cpu usage still 100%.
After enabled stat, the log:
2016-11-16 16:56:37,546 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.read-cache-hits, count=21671, min=6.879999999999999E-4, max=0.035417, mean=0.0015175175097276263, stddev=0.0019345367031356107, median=0.001241, p75=0.0014857499999999999, p95=0.002438899999999998, p98=0.0035251799999999945, p99=0.005444550000000007, p999=0.03535641900000001, mean_rate=22.58734472301873, m1=84.39411867058821, m5=48.11240752194036, m15=20.77283687896956, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,546 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.read-cache-hits-fail, count=0, min=0.0, max=0.0, mean=0.0, stddev=0.0, median=0.0, p75=0.0, p95=0.0, p98=0.0, p99=0.0, p999=0.0, mean_rate=0.0, m1=0.0, m5=0.0, m15=0.0, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,546 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.read-cache-misses, count=44, min=5377.533544999999, max=8165.4839249999995, mean=6163.4561557045445, stddev=682.8165566878679, median=5878.1123275, p75=6319.618259999999, p95=7783.444525749999, p98=8165.4839249999995, p99=8165.4839249999995, p999=8165.4839249999995, mean_rate=0.04586050502350609, m1=0.16778861957075686, m5=0.09613923674913623, m15=0.041518573863973486, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,546 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.read-cache-misses-fail, count=0, min=0.0, max=0.0, mean=0.0, stddev=0.0, median=0.0, p75=0.0, p95=0.0, p98=0.0, p99=0.0, p999=0.0, mean_rate=0.0, m1=0.0, m5=0.0, m15=0.0, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,546 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.read-entry, count=21739, min=0.001761, max=6258.103631, mean=11.848359065175098, stddev=268.50722523997473, median=0.002434, p75=0.00310275, p95=0.004722399999999999, p98=0.0058926999999999955, p99=0.007628020000000005, p999=6248.241737416001, mean_rate=22.658196992965564, m1=84.5629030485838, m5=48.20859873250287, m15=20.814361490027295, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,547 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.read-entry-fail, count=1, min=0.324559, max=0.324559, mean=0.324559, stddev=0.0, median=0.324559, p75=0.324559, p95=0.324559, p98=0.324559, p99=0.324559, p999=0.324559, mean_rate=0.0010422832855265462, m1=1.383502708828376E-4, m5=0.0012784533730485269, m15=8.072816662657008E-4, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,547 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.readahead-batch-count, count=44, min=1000.0, max=1000.0, mean=1000.0, stddev=0.0, median=1000.0, p75=1000.0, p95=1000.0, p98=1000.0, p99=1000.0, p999=1000.0, mean_rate=0.045860470597819974, m1=0.16778861957075686, m5=0.09613923674913623, m15=0.041518573863973486, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,547 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.readahead-batch-count-fail, count=0, min=0.0, max=0.0, mean=0.0, stddev=0.0, median=0.0, p75=0.0, p95=0.0, p98=0.0, p99=0.0, p999=0.0, mean_rate=0.0, m1=0.0, m5=0.0, m15=0.0, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,547 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.readahead-batch-size, count=44, min=332000.0, max=332000.0, mean=332000.0, stddev=0.0, median=332000.0, p75=332000.0, p95=332000.0, p98=332000.0, p99=332000.0, p999=332000.0, mean_rate=0.04586046636091089, m1=0.16778861957075686, m5=0.09613923674913623, m15=0.041518573863973486, rate_unit=events/second, duration_unit=milliseconds
2016-11-16 16:56:37,547 - INFO  [metrics-logger-reporter-thread-1:MarkerIgnoringBase@107] - type=TIMER, name=bookie.storage.readahead-batch-size-fail, count=0, min=0.0, max=0.0, mean=0.0, stddev=0.0, median=0.0, p75=0.0, p95=0.0, p98=0.0, p99=0.0, p999=0.0, mean_rate=0.0, m1=0.0, m5=0.0, m15=0.0, rate_unit=events/second, duration_unit=milliseconds

I changed ledgerStorageClass=org.apache.bookkeeper.bookie.SortedLedgerStorage in bookkeeper.conf, the throughput is healthy now.

I changed ledgerStorageClass=org.apache.bookkeeper.bookie.SortedLedgerStorage in bookkeeper.conf, the throughput is healthy now.

Seems to work, thanks!

For example, to report stats to SLF4J logger, add this to bookkeeper.conf :

statsProviderClass=org.apache.bookkeeper.stats.CodahaleMetricsProvider
codahaleStatsSlf4jEndpoint=stats

@merlimat couldn't get this to work, Bookkeeper is complaining it can't find that class.

@merlimat couldn't get this to work, Bookkeeper is complaining it can't find that class.

Ouch, I think that's because we are not including the dependency on org.apache.bookkeeper:codahale-metrics-provider in the distribution tgz.

I changed ledgerStorageClass=org.apache.bookkeeper.bookie.SortedLedgerStorage in bookkeeper.conf, the throughput is healthy now.

@sschepens @DongbinNie If you don't have many topics per single bookie (< 10K). The SortedLedgerStorage it's probably a very good choice.

@merlimat what other choice do we have?  the default storage now is triggering really bad performance

The default storage implementation in Apache BookKeeper is SortedLedgerStorage. The "older" implementation was the InterleavedLedgerStorage, which is still available and has the same index format as the SortedLedgerStorage. The 2 are pretty much interchangeable, with the main difference being that SortedLedgerStorage maintains an in memory write-cache of entries, and then sorts them before flushing the entry-log. This gives better read-throughput when draining backlog.
At Yahoo we have developed DbLedgerStorage, which share some of goals of SortedLedgerStorage, but it's designed to scale to 100s of thousands of active ledgers per bookie. Again we have a write cache / read cache and we keep the offset indexes in RocksDB. This implementation is quite stable and used in prod since long time. Probably there may be some
configuration parameters that need to be adjusted in some way for different machine specs.
Can you share the exact steps of your test, so that I can try to reproduce the bad behavior locally?

Can you share the exact steps of your test, so that I can try to reproduce the bad behavior locally?

It can be re-produced easily in my env(with SAS disk) in following steps:

starting perf-consumer: bin/pulsar-perf consume -n 1 -s sub-0 -q 1000 -u foo_url bar_topicUrl
starting perf-producer: bin/pulsar-perf produce -n 20 -r 10000 -s 256 -u foo_url bar_topicUrl
after received some messages in the consumer side, stop the consumer
let the producer running for some times, e.g. 30 mins
restart the perf-consumer: bin/pulsar-perf consume -n 1 -s sub-0 -q 1000 -u foo_url bar_topicUrl

Probably there may be some
configuration parameters that need to be adjusted in some way for different machine specs.

Despite of the configuration, I believe there can be some enhancement in org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage.fillReadAheadCache(long, long, long), that it will be much efficient to use rocksdb's iterator to expose the db's range scan ability other than seeking for every location

Despite of the configuration, I believe there can be some enhancement in org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage.fillReadAheadCache(long, long, long), that it will be much efficient to use rocksdb's iterator to expose the db's range scan ability other than seeking for every location

The best option there is actually to completely bypass the rocksdb reads and just scan the BK entrylog file, and stopping when an entry for a different ledger is found (or max batch count entries were read).

I have created a PR https://github.com/yahoo/bookkeeper/pull/1/files for modifying the fillReadAheadCache to use rocksdb's iterator, after patched in my env, the reading QPS goes to 30,000 from 300.
the compiled jar is attached for quick evaluation, please rename bookkeeper-server-<IP_ADDRESS>-yahoo-iterator.zip to bookkeeper-server-<IP_ADDRESS>-yahoo-iterator.jar.
bookkeeper-server-<IP_ADDRESS>-yahoo-iterator.zip

@DongbinNie Nice finding. This looks like a perf regression introduced in bookkeeper-server-<IP_ADDRESS>-yahoo that was included in v1.15.
The read-ahead code itself was not changed significantly, but before there was an in-memory cache of the offset that was skipping the rocksdb get calls.
Your change looks good, though I'd prefer to scan directly the entry log and avoid rocks db interaction in the read-ahead logic, as the iterators themselves can perform slowly under certain conditions.
I'm testing out the change right now and will update here.

I just ran the tests with the change that avoid to do RocksDB get() when filling the read-ahead cache and I can clearly see the improvement, though I am seeing a very different number in the baseline on my hardware/config:
Conditions:

200 GB of backlog
1 KB message sizes
50 K writes /s
No batches (batches make the problem too easy for the bookie, consumer can easily fetch ~300K msg/s without any change)

Backlog draining:

Before: 34 K reads/s
After: 58 K reads/s

Merged the fix in master. @sschepens @DongbinNie can you try again to check whether it improves backlog draining in your setup?

Merged the fix in master. @sschepens @DongbinNie can you try again to check whether it improves backlog draining in your setup?

I test in my env, the consumer QPS can goes to 30,000 with the latest master branch build.
I'm wondering another case, if there were many writing topic, will it impact the performance due to fillReadAheadCache may only query a little entries every time(I'm not familiar with bookkeeper for now).

Entries are expected to be mostly sequential on the bookie entry logs, and that is why we have introduced the read-ahead cache.
The reason is that when a write reaches the bookie, first it is appended and synced on the journal (for durability) and then inserted into the write cache.
Write cache is in memory in the bookie process and it gets flushed periodically (default 1min). When flushing, we sort the entries by ledgerId/entryId, so that messages for the same topic are stored sequentially on disk, for that 1min interval.
You can try publishing and consuming on many topics by passing the "-t 100" flag on the perf tools.

Closing this one. I will open a new PR with documentation for all the DbStorage configuration parameters.

@merlimat still seeing strange performance on nodes when autorecovery is running, some nodes go to 100% cpu utilization and are apparently hung on reading from rocksdb
What seems strange is that we have configured 4GB of readahead cache, but it doesn't even seem to be using it, processes are consuming about 2GB memory total. RocksDB block cache size is also 4GB.

@merlimat Found something curious, Bookkeepers we're logging Entry location cache max size: 16 MB.
You recommended incrementing dbStorage_rocksDB_blockCacheSize to allow locations to fit, but it seems there's another configuration for that (dbStorage_entryLocationCacheMaxSizeMb) which is defaulted at 16MB.
Incrementing this value to 4GB immediately caused bookies cpu usage to drop significantly.

CPU is down now, even tough, read throughput is still extremely low...
This seemed to happen when we restarted our bookkeepers

@sschepens dbStorage_entryLocationCacheMaxSizeMb was actually unused in 1.15. I have removed the keys from BK branch. Can you paste all the config settings you are currently using?
If you re-do the initial test of backlog draining, without restarting bookies, does it show higher read throughput?

To give some insights, before restarting our bookies and we started observing this behavior, we were having a read throughput double the amount of the spike in the graph constantly.

So, restarting the bookies, in general triggers the auto-recovery for each of the restarted bookie.
To avoid that, in a controlled restart you should be disabling auto-recovery (bin/bookkeeper shell autorecovery -disable) and then re-enable when the bookie is back up (bin/bookkeeper shell autorecovery -enable)

This is our current config file.
We're in the process of re running a test on a new topic.
#
# Copyright 2016 Yahoo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

## Bookie settings

# Port that bookie server listen on
bookiePort=3181

# Set the network interface that the bookie should listen on.
# If not set, the bookie will listen on all interfaces.
#listeningInterface=eth0

# Whether the bookie allowed to use a loopback interface as its primary
# interface(i.e. the interface it uses to establish its identity)?
# By default, loopback interfaces are not allowed as the primary
# interface.
# Using a loopback interface as the primary interface usually indicates
# a configuration error. For example, its fairly common in some VPS setups
# to not configure a hostname, or to have the hostname resolve to
# <IP_ADDRESS>. If this is the case, then all bookies in the cluster will
# establish their identities as <IP_ADDRESS>:3181, and only one will be able
# to join the cluster. For VPSs configured like this, you should explicitly
# set the listening interface.
#allowLoopback=false

# Directory Bookkeeper outputs its write ahead log
journalDirectory=data/bookkeeper/journal

# Directory Bookkeeper outputs ledger snapshots
# could define multi directories to store snapshots, separated by ','
# For example:
# ledgerDirectories=/tmp/bk1-data,/tmp/bk2-data
#
# Ideally ledger dirs and journal dir are each in a differet device,
# which reduce the contention between random i/o and sequential write.
# It is possible to run with a single disk, but performance will be significantly lower.
ledgerDirectories=data/bookkeeper/ledgers
# Directories to store index files. If not specified, will use ledgerDirectories to store.
# indexDirectories=data/bookkeeper/ledgers

# Ledger Manager Class
# What kind of ledger manager is used to manage how ledgers are stored, managed
# and garbage collected. Try to read 'BookKeeper Internals' for detail info.
ledgerManagerType=hierarchical

# Root zookeeper path to store ledger metadata
# This parameter is used by zookeeper-based ledger manager as a root znode to
# store all ledgers.
# zkLedgersRootPath=/ledgers

# Ledger storage implementation class
ledgerStorageClass=org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage

# Enable/Disable entry logger preallocation
# entryLogFilePreallocationEnabled=true

# Max file size of entry logger, in bytes
# A new entry log file will be created when the old one reaches the file size limitation
# logSizeLimit=2147483648

# Threshold of minor compaction
# For those entry log files whose remaining size percentage reaches below
# this threshold will be compacted in a minor compaction.
# If it is set to less than zero, the minor compaction is disabled.
# minorCompactionThreshold=0.2

# Interval to run minor compaction, in seconds
# If it is set to less than zero, the minor compaction is disabled.
# minorCompactionInterval=3600

# Threshold of major compaction
# For those entry log files whose remaining size percentage reaches below
# this threshold will be compacted in a major compaction.
# Those entry log files whose remaining size percentage is still
# higher than the threshold will never be compacted.
# If it is set to less than zero, the minor compaction is disabled.
majorCompactionThreshold=0.5

# Interval to run major compaction, in seconds
# If it is set to less than zero, the major compaction is disabled.
# majorCompactionInterval=86400

# Set the maximum number of entries which can be compacted without flushing.
# When compacting, the entries are written to the entrylog and the new offsets
# are cached in memory. Once the entrylog is flushed the index is updated with
# the new offsets. This parameter controls the number of entries added to the
# entrylog before a flush is forced. A higher value for this parameter means
# more memory will be used for offsets. Each offset consists of 3 longs.
# This parameter should _not_ be modified unless you know what you're doing.
# The default is 100,000.
#compactionMaxOutstandingRequests=100000

# Set the rate at which compaction will readd entries. The unit is adds per second.
#compactionRate=1000

# Throttle compaction by bytes or by entries.
#isThrottleByBytes=false

# Set the rate at which compaction will readd entries. The unit is adds per second.
#compactionRateByEntries=1000

# Set the rate at which compaction will readd entries. The unit is bytes added per second.
#compactionRateByBytes=1000000

# Max file size of journal file, in mega bytes
# A new journal file will be created when the old one reaches the file size limitation
#
# journalMaxSizeMB=2048

# Max number of old journal file to kept
# Keep a number of old journal files would help data recovery in specia case
#
# journalMaxBackups=5

# How much space should we pre-allocate at a time in the journal
# journalPreAllocSizeMB=16

# Size of the write buffers used for the journal
# journalWriteBufferSizeKB=64

# Should we remove pages from page cache after force write
journalRemoveFromPageCache=true

# Should we group journal force writes, which optimize group commit
# for higher throughput
# journalAdaptiveGroupWrites=true

# Maximum latency to impose on a journal write to achieve grouping
journalMaxGroupWaitMSec=1

# All the journal writes and commits should be aligned to given size
journalAlignmentSize=4096

# Maximum writes to buffer to achieve grouping
# journalBufferedWritesThreshold=524288

# If we should flush the journal when journal queue is empty
# journalFlushWhenQueueEmpty=false

# The number of threads that should handle journal callbacks
numJournalCallbackThreads=8

# The number of max entries to keep in fragment for re-replication
rereplicationEntryBatchSize=5000

# How long the interval to trigger next garbage collection, in milliseconds
# Since garbage collection is running in background, too frequent gc
# will heart performance. It is better to give a higher number of gc
# interval if there is enough disk capacity.
gcWaitTime=900000

# How long the interval to trigger next garbage collection of overreplicated
# ledgers, in milliseconds [Default: 1 day]. This should not be run very frequently since we read
# the metadata for all the ledgers on the bookie from zk
# gcOverreplicatedLedgerWaitTime=86400000

# How long the interval to flush ledger index pages to disk, in milliseconds
# Flushing index files will introduce much random disk I/O.
# If separating journal dir and ledger dirs each on different devices,
# flushing would not affect performance. But if putting journal dir
# and ledger dirs on same device, performance degrade significantly
# on too frequent flushing. You can consider increment flush interval
# to get better performance, but you need to pay more time on bookie
# server restart after failure.
#
flushInterval=60000

# Interval to watch whether bookie is dead or not, in milliseconds
#
# bookieDeathWatchInterval=1000

## zookeeper client settings

# A list of one of more servers on which zookeeper is running.
# The server list can be comma separated values, for example:
# zkServers=zk1:2181,zk2:2181,zk3:2181
zkServers=localhost:2181
# ZooKeeper client session timeout in milliseconds
# Bookie server will exit if it received SESSION_EXPIRED because it
# was partitioned off from ZooKeeper for more than the session timeout
# JVM garbage collection, disk I/O will cause SESSION_EXPIRED.
# Increment this value could help avoiding this issue
zkTimeout=30000

## NIO Server settings

# This settings is used to enabled/disabled Nagle's algorithm, which is a means of
# improving the efficiency of TCP/IP networks by reducing the number of packets
# that need to be sent over the network.
# If you are sending many small messages, such that more than one can fit in
# a single IP packet, setting server.tcpnodelay to false to enable Nagle algorithm
# can provide better performance.
# Default value is true.
#
# serverTcpNoDelay=true

## ledger cache settings

# Max number of ledger index files could be opened in bookie server
# If number of ledger index files reaches this limitation, bookie
# server started to swap some ledgers from memory to disk.
# Too frequent swap will affect performance. You can tune this number
# to gain performance according your requirements.
openFileLimit=0

# Size of a index page in ledger cache, in bytes
# A larger index page can improve performance writing page to disk,
# which is efficent when you have small number of ledgers and these
# ledgers have similar number of entries.
# If you have large number of ledgers and each ledger has fewer entries,
# smaller index page would improve memory usage.
# pageSize=8192

# How many index pages provided in ledger cache
# If number of index pages reaches this limitation, bookie server
# starts to swap some ledgers from memory to disk. You can increment
# this value when you found swap became more frequent. But make sure
# pageLimit*pageSize should not more than JVM max memory limitation,
# otherwise you would got OutOfMemoryException.
# In general, incrementing pageLimit, using smaller index page would
# gain bettern performance in lager number of ledgers with fewer entries case
# If pageLimit is -1, bookie server will use 1/3 of JVM memory to compute
# the limitation of number of index pages.
pageLimit=0

#If all ledger directories configured are full, then support only read requests for clients.
#If "readOnlyModeEnabled=true" then on all ledger disks full, bookie will be converted
#to read-only mode and serve only read requests. Otherwise the bookie will be shutdown.
#By default this will be disabled.
readOnlyModeEnabled=true

#For each ledger dir, maximum disk space which can be used.
#Default is 0.95f. i.e. 95% of disk can be used at most after which nothing will
#be written to that partition. If all ledger dir partions are full, then bookie
#will turn to readonly mode if 'readOnlyModeEnabled=true' is set, else it will
#shutdown.
#Valid values should be in between 0 and 1 (exclusive).
#diskUsageThreshold=0.95

#Disk check interval in milli seconds, interval to check the ledger dirs usage.
#Default is 10000
#diskCheckInterval=10000

# Interval at which the auditor will do a check of all ledgers in the cluster.
# By default this runs once a week. The interval is set in seconds.
# To disable the periodic check completely, set this to 0.
# Note that periodic checking will put extra load on the cluster, so it should
# not be run more frequently than once a day.
#auditorPeriodicCheckInterval=604800

# The interval between auditor bookie checks.
# The auditor bookie check, checks ledger metadata to see which bookies should
# contain entries for each ledger. If a bookie which should contain entries is
# unavailable, then the ledger containing that entry is marked for recovery.
# Setting this to 0 disabled the periodic check. Bookie checks will still
# run when a bookie fails.
# The interval is specified in seconds.
#auditorPeriodicBookieCheckInterval=86400

# number of threads that should handle write requests. if zero, the writes would
# be handled by netty threads directly.
numAddWorkerThreads=0

# number of threads that should handle read requests. if zero, the reads would
# be handled by netty threads directly.
numReadWorkerThreads=8

# If read workers threads are enabled, limit the number of pending requests, to
# avoid the executor queue to grow indefinitely
maxPendingReadRequestsPerThread=2500

# The number of bytes we should use as capacity for BufferedReadChannel. Default is 512 bytes.
readBufferSizeBytes=4096

# The number of bytes used as capacity for the write buffer. Default is 64KB.
# writeBufferSizeBytes=65536

# Whether the bookie should use its hostname to register with the
# co-ordination service(eg: zookeeper service).
# When false, bookie will use its ipaddress for the registration.
# Defaults to false.
#useHostNameAsBookieID=false

# Stats Provider Class
#statsProviderClass=org.apache.bookkeeper.stats.CodahaleMetricsProvider
codahaleStatsSlf4jEndpoint=stats

dbStorage_rocksDBEnabled=true

# This is where the data is stored before flushing. This will come from JVM direct memory.
dbStorage_writeCacheMaxSizeMb=256
#
# # Read-ahead cache to speed up backlog draining. From direct memory
dbStorage_readAheadCacheMaxSizeMb=4096
dbStorage_readAheadCacheBatchSize=1000
#
# # Give 4GBytes to RocksDB block cache. Ideally this cache should be big enough
# # to contain most of the locations index data/bookkeeper/ledgers/current/locations/
dbStorage_rocksDB_blockCacheSize=4294967296
dbStorage_entryLocationCacheMaxSizeMb=4096

dbStorage_rocksDB_writeBufferSizeMB=64
dbStorage_rocksDB_sstSizeInMB=64
dbStorage_rocksDB_blockSize=65536
dbStorage_rocksDB_bloomFilterBitsPerKey=10
dbStorage_rocksDB_numLevels=-1
dbStorage_rocksDB_numFilesInLevel0=4
dbStorage_rocksDB_maxSizeInLevel1MB=256

So, restarting the bookies, in general triggers the auto-recovery for each of the restarted bookie.

To avoid that, in a controlled restart you should be disabling auto-recovery (bin/bookkeeper shell autorecovery -disable) and then re-enable when the bookie is back up (bin/bookkeeper shell autorecovery -enable)

We're not running any autorecovery process, this should not be the case, but we'll try

dbStorage_writeCacheMaxSizeMb=256

This should be bigger, to avoid stalling the writes when the flush is slower. As I commented on the other issue, ideally it should be holding 1min worth of write traffic.

This should be bigger, to avoid stalling the writes when the flush is slower. As I commented on the other issue, ideally it should be holding 1min worth of write traffic.

We're seeing read throughput issues, not write issues.
We did experience some issues when setting dbStorage_writeCacheMaxSizeMb too high, our ledgers storage seemed to be really stressed out by huge writes.

Another update, writing and consuming from a new topic (without restarting bookies) seems to work just fine. Gonna try restarting bookies now.

@merlimat while I'm evaluating Pulsar, it will be very appreciated that you can list some real data in your production env, e.g. the number of bookie servers, bookie server's hardware,  the number of topic and subscription, throughput, latency of message producing.
Thanks.

@DongbinNie
We have shared some numbers on our blog post: https://yahooeng.tumblr.com/post/150078336821/open-sourcing-pulsar-pub-sub-messaging-at-scale
Also, take a look at the slides from a recent talk I gave:
http://www.slideshare.net/merlimat/pulsar-distributed-pubsub-platform
For bookie hardware, there is a brief explanation at https://github.com/yahoo/pulsar/blob/master/docs/ClusterSetup.md#bookkeeper
Let me know if you want more details

Thanks @merlimat
Our business is heavily relied on MQ(rabbitmq for current), and the produce latency is very critical for us while the throughput is growing rapidly.
The underlying bookkeepr need to fsync the journal for every message(including batching) to complete the message adding, it means the bookkeeper must be deployed into SSD severs which will increase the costing of sever, so I'm very curious about the real data in your production practice.  :-)
The slides page 4 mentions "Average latency <5ms, 99% 15ms", and the page 24 mentions a single topic's measurement that focus on tp99 < 5ms, If convenience, could you list some detail data about the two cases that the cluster size, especially the bookkeeper size and hardware, the topics and throughput...
Thanks in advance.


TypeError with method call involving spread operator

@chochos the recent fixes look good, but I'm still having trouble with my original use case. Hopefully this is a better approximation:
shared void runTests() {
    value args = ["Cey", "lon"];
    exec2((String x, String y) => x.plus(y), identity<[String, String]>, args);
    // TypeError: Object [object Object] has no method 'plus'

    exec2(uncurry(String.plus), identity<[String, String]>, args);
    // TypeError: Cannot read property 'jsc$' of undefined
}

void exec2<Args, RawArgs>(
        String(*Args) op,
        Args(RawArgs) transform,
        RawArgs args)
        given Args satisfies Anything[] {
    value [*xs] = transform(args);
    print(op(*xs));
}

I wasn't able to further isolate the issue. The error does not occur if exec2 is removed, with its operations performed directly by runTests. It also works without destructuring:
    value xs = transform(args);
    print(op(*xs));

or by using unflatten as a workaround:
    value [*xs] = transform(args);
    print(unflatten(op)(xs));

Weird, I tested on your original use cases and they all passed.

Mmmm so maybe the problem is in destructuring the args value [*xs] = transform(args)...

ah no, it's something else. Anyway, fix coming right up...

Great, thanks! Everything works now.


Duplicate type name from automatically named property of schema

Hello everyone,
I've just spent some time debugging this, I solved it for myself given that it actually was a typo, but I feel like this is a real issue.
go version: 1.22.0 linux/amd64
oapi-codegen version: 2.3.0
YAML config:
package: build
generate:
  echo-server: true
  models: true
output: build/openapi.go

openapi.yaml:
openapi: 3.0.0
components:
  schemas:
    Request:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
      required:
        - status
    RequestStatus:
      type: string
      enum:
        - created
        - waiting_for_review
        - waiting_for_payment
        - paid
        - processing
        - completed
        - expired

paths:
  /requests:
    get:
      operationId: GetRequest
      parameters:
        - name: status
          in: query
          description: Request status (filter)
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/RequestStatus'
      responses:
        '200':
          description: User's request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Request'
          headers:
            Conio-RequestID:
              description: Request ID
              schema:
                type: string
            Conio-SessionID:
              description: Session ID
              schema:
                type: string

Basically what will happen here is that oapi-codegen will create a struct for the Request model that will have a Status property of type RequestStatus.
This RequestStatus is a string type that defines what the property is, the catch here is that the name RequestStatus has been chosen by oapi-codegen.
This means that if I actually define a RequestStatus, like the schema below Request, it will create a conflict between the two of them and exit the code generation with this error:
error generating code: error generating type definitions: error generating code for type definitions: duplicate typename 'RequestStatus' detected, can't auto-rename, please use x-go-name to specify your own name for one of them

Now, as suggested by the error's text, we can add x-go-name, give it a name and everything will be fine.
I'm my case this is not working.
Just to be clear, this is what the Request schema is after the add:
Request:
      type: object
      properties:
        status:
          x-go-name: RequestStatusProp
          type: string
          enum:
            - success
      required:
        - status

Now, I'd like to raise two points here:

is there a way to make the error explain a little bit better what actually is happening? I spent some hours behind that before understanding what actually was happening;
is the x-go-name actually not working in this case? Or am I using it wrong?

BTW, I'd like to precise that I see there is an architectural issue here, the property status of the object Request can NOT be different from an object called RequestStatus (it can but is highly misleading).
Anyway, take the openapi just as an example for the sake of this issue.

bro you are working on linux how did you downloaded oapi because i downloaded oapi and when i whrite some command i am getting error oapi-codegen : command not found i am working on ubuntu 22.04


Config file generation fixes

What type of PR is this?

[X] bug
[ ] cleanup
[ ] documentation
[ ] feature

What this PR does / why we need it:
This PR fixes two bugs in config generation:

When updating node labels they are not propagated to the config file because the updated_rke2_config is not saved to the rke2_config fact
When updating agent config file the token and server url are lost because they are only injected to the temporary file and not to the rke2_config fact. This makes the following service restart fail. Since the temporary file contains rke2_config and the token/server url I elected to use that file for the resulting config instead of the rke2_config fact.

Which issue(s) this PR fixes:
No issues made, found out these issues while testing the playbook myself and elected to offer a fix.

Release Notes

NONE

Thank you for your contribution @mlflr . I am testing this now.


lib: modules.sh should check JSON output for predictability

Description of changes
Currently, the lib/tests/modules.sh test checks the output of nix-instantiate --eval without --json, which outputs an unspecified human-readable format.
This patch modifies modules.sh to use the --json output instead, to be robust against future changes to nix-instantiate output.
See also: https://github.com/NixOS/nix/pull/9606
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@9999years Oh, I only just realised that your manual backports in https://github.com/NixOS/nixpkgs/pull/275462 and https://github.com/NixOS/nixpkgs/pull/275268 went to the staging branches. This isn't ideal, they should go to the main development branches (release-*) instead. Doesn't matter much though, it's just gonna take like up to a week now for the backports to land in the release channels.
I'll close the automatic backports, those won't be necessary. If you're wondering about the staging workflow, see https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#staging


ShareGPT Dataset?

Hello, I see ShareGPT's dataset is listed on the readme, but the download for alpaca format version is not listed. Can it get listed? Very interested.

Sorry, I found the dataset on your huggingface.
I looked over it though, and the dataset format might be concerning.
I may be ignorant, but if trained on the ShareGPT alpaca-format dataset, the model may not coherently learn.
ex.
        "instruction": "I have an interview about product speccing with the company Weekend Health. Give me an example of a question they might ask with regards about a new feature",
        "input": "",
        "output": "\"Can you walk us through the process you would use to gather requirements and create a specification for a new feature that our users have been requesting, such as a personalized nutrition plan feature?\""
    },
    {
        "instruction": "Give me a few more",
        "input": "",
        "output": "* \"How would you approach creating a specification for a new feature that integrates with third-party fitness trackers and allows for seamless data tracking and analysis for our users?\"\n* \"Can you give an example of a time when you had to navigate competing stakeholder"
    },

These 2 sequences will likely not be related to eachother during training, making it much more irratic than the way vicuna's original dataset in their format would learn to be

Looked into this for a bit. sharegpt_context.json has the same issue to an extent. It seems that everyone is processing the ShareGPT data using Vicuna's pipeline, including this part, which chunks long conversations based on token count.
So rather than throwing out data after hitting the context window, we have a fair amount of chats in sharegpt_context.json that start in the middle of things with the first prompt being something like "[HM]: continue". Not sure if training on this is harmful or helpful.

It would be wise, imo, to alter the vicuna pipeline to simply throw away the sequences that get split off, or perhaps, if needed, throw out all convos that are too long, maybe make a 2k ctx length version and a 4k one - since 4k llama models have started to appear (although are not working well at all rn, they will soon)

I also think since a lot of datasets are doing this that it likely has something to do with the vicuna "random stopping" issues

At present, there are some works to clean the ShareGPT dataset, and we will continue to pay attention to it.

At present, there are some works to clean the ShareGPT dataset, and we will continue to pay attention to it.

Can you link any of those?

At present, there are some works to clean the ShareGPT dataset, and we will continue to pay attention to it.

Can you link any of those?

https://paratranz.cn/projects/6725
https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered


Add Frog Resource Pack

This is a feature which some users wanted and was given the go-ahead by @pyxld-kris to be put into the server.
Some Info:
Servers which use a set resource pack need an available download link to the .zip file. We shouldn't just set the server resource pack to this frog one because we will add additional textures/resources in the future. Therefore we will need to host this resource pack somewhere, whether that be on Github, a DevLaunchers server, or some a hosting platform.
Instructions on how to add a resource pack to a server can be found here.
The resource pack forum post (and download) can be found here.
If someone else doesn't add this in the next week, I'll submit a pull request with the feature added when I have more free time.

make everything a frog yes

This is great info, thank you Max!

I think we can probably serve this up from Github, potentially with a clever combination of GitHub Actions and GitHub Pages

@MaxWiens @pyxld-kris It seems this won't work, bacause of the pack only working on 1.12 as we are on 1.16.4

@Thatcooldevguy What are our alternative options?

hmm, let me look into it.

@MaxWiens @pyxld-kris It seems this won't work, bacause of the pack only working on 1.12 as we are on 1.16.4

Exactly what "pack" are you referencing here.

@Thatcooldevguy I have updated the resource pack. The updated pack is in the minecraft-devs channel of the Dev Launchers discord.

@MaxWiens Alright, I'll add it.

This issue is solved. We have a new repository with a new custom resource pack which works with the latest version of minecraft HERE


This is not an HTML framework!

Hello, Cop Billhere.
I noticed some things wrong with your project

HTML cant have frameworks, what would it do?
If whatever you made just makes it easier to code in HTML, ex - allowing to code without typing tags, etc.
It is called a compiler...


A tool to easily create an IPA

Since we now depend on the user having to launch from Xcode, code signing and packaging is handled by the Xcode harness already.

is this documented somewhere?


Verify and document local dev environment for nodejs backend

@AagamShah97 ,  I'm looking at re-instating the code that was excluded somehow on :
https://github.com/nanoMFG/gr-resq-webapp-backend
when I did this:
https://github.com/nanoMFG/gr-resq-webapp-backend/commit/a953508ce08a592a25eeddf781b5c00ccad95a02
It looks like I just need to re-commit everything in the node-backend branch.
Is this what we want?
I think we just want the nodejs part.


[Feature Request] padding 0 to align result

can add options to padding 0 to align result ?
like this
console.log(humanizeDuration(3884 * 1000, {padding:'0'} ));
console.log(humanizeDuration(5941 * 1000, {padding:'0'}));

//1 hour, 04 minutes, 44 seconds
//1 hour, 39 minutes, 01 seconds

if any one  have same feature,  use this
  timeHumanize(s) {
            const DELIMITER = ' ';
            const str = humanizeDuration(s * 1000, { delimiter: DELIMITER });

            const reg = new RegExp(`(?<=[hour|minutes|seconds]${DELIMITER})(\\d{1})(?=${DELIMITER})`, 'g');
            return str.replace(reg, t => t.padStart(2, '0'));
        },

This library is actively maintained but no new features will be added. Sorry!


bug: Python function parameters unreadable

Did you check docs and existing issues?

[X] I have read all the tokyonight.nvim docs
[X] I have searched the existing issues of tokyonight.nvim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
v0.9.1
Operating system/version
MacOS 13.4
Describe the bug

See above screenshot. Some function arguments are almost unreadable on a low-contrast screen.
I've tried to override the color myself, but I am unsure how to best approach this after reading the relevant section in the README.
Steps To Reproduce
Create a python file with the following function declaration:
def visitor_body(page, text, cm, tm, fontDict, fontSize, **kwargs):
  pass

Expected Behavior
Text should be readable, even on low-contrast screens.
This is what the same function looks like in VSCode with the Tokyonight scheme enabled.

After further investigation, this issue seems to be specific to running nvim inside kitty terminal.
The same function looks like when running nvim current iTerm:

Must be something in your config. This is how it is supposed to look like:


Trouble creating macaroon file (lncli create+rpc error)

Background
I am working through the tutorial to build from source but got stuck at running LND using the btcd backend. I ran this command and got the prompt to create or unlock a wallet:
lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=bitcoind --bitcoind.rpcuser=<username> --bitcoind.rpcpass=<password> --bitcoind.zmqpubrawblock=tcp://<IP_ADDRESS>:28332 --bitcoind.zmqpubrawtx=tcp://<IP_ADDRESS>:28333 --externalip=<my computer's ip>
I tried running lncli create but I keep getting this RPC error:
[lncli] rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <IP_ADDRESS>:10009: connect: connection refused"
I include a new seed mnemonic every time I try to create a new wallet. I think I must have missed out on some configurations but I'm not entirely sure where they are.
I looked at this similar issue and tried downgrading RPC to version 1.17.0 but still ran into the same error.
Your environment

version of lnd
lnd v0.6.1-beta

which operating system
MacOS Mojave 10.14.5

version of btcd, bitcoind, or other backend
btcd version 0.12.0-beta

version of go
go1.12.4 darwin/amd64

bitcoin.conf
testnet=1
server=1
daemon=1
zmqpubrawblock=tcp://<IP_ADDRESS>:28332
zmqpubrawtx=tcp://<IP_ADDRESS>:28333

Expected behaviour
Macaroon file should be created
Actual behaviour
All subConns in TransientFailure

@zhongtan  You have --bitcoind.rpcuser=<username> --bitcoind.rpcpass=<password> in your lnd.conf but not in bitcoin.conf.  You need to set the same credentials in both.  For bitcoin.conf it should be
rpcuser=<username>
rpcpassword=<password>

My bad, I was supposed to run lnd in another session while creating the wallet. I included the credentials in my bitcoin.conf and ran the lnd command again with all the flags. I got a different error instead:
[lncli] rpc error: code = Unknown desc = wrong seed version
I tried deleting the entire LND folder and started over but still got the same error above. Any ideas on what might be wrong?

I ended up not using an existing cipher seed and let lnd generate a new seed for me. Not getting the error anymore, thanks!

wrong seed version

This sounds like you're not using a proper cipher seed?

Hey @guggero thanks for you reply. It's RaspiBolt Software. I waited a few minutes until the message  Waiting for wallet encryption password. Use lncli createto create a wallet,lncli unlockto unlock an existing wallet, orlncli changepassword to change the password of an existing wallet and unlock it.
After this message the cmd lncli unlock went through.

I meet the samiliar question. I can use lncli create and lncli unlock, but when I use other commands. It feeds back the error.
[lncli] rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <IP_ADDRESS>:10009: connect: connection refused"

so am I. Have you resoved it?

I meet the samiliar question. I can use lncli create and lncli unlock, but when I use other commands. It feeds back the error.
[lncli] rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <IP_ADDRESS>:10009: connect: connection refused"

Did you find the solution for this? I have the same issue now after upgrading RaspiBlitz from 1.6.1 to 1.6.2.

I meet the samiliar question. I can use lncli create and lncli unlock, but when I use other commands. It feeds back the error.
[lncli] rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <IP_ADDRESS>:10009: connect: connection refused"

so am I. Have you resoved it?

Were you able to resolve this?

I have a similar problem after beeing unable to remove macaroon files and upgrading on a RaspiBolt: https://github.com/Stadicus/RaspiBolt/issues/734
But I have to say that I used their recommendations of how to upgrade  and I am unsure if this is up-to-date because LND seems to just do it with a docker now.

I ended up not using an existing cipher seed and let lnd generate a new seed for me. Not getting the error anymore, thanks!

how to let lnd generate a new seed? I meet the same error as you.
[lncli] rpc error: code = Unknown desc = wrong seed version


@Darinzhao you can enumerate custom models endpoints logs through Get Custom Model Endpoint Logs, check .values[].self on the result.

    @Darinzhao you can enumerate custom models endpoints logs through [Get Custom Model Endpoint Logs](https://westus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetEndpointLogs), check `.values[].self` on the result.

Originally posted by @mahilleb-msft in https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/1742#issuecomment-1319835713

Hi there,
I want get specific log that I need. But with the method you mentioned I can not get the specific log.As the API document said, if  I need to get the specific log I can use  [Get Custom Model Endpoint Log]. To use this method , it is be required a logid, I have no idea to get this logid. So could help tell how can I get this logid.
Thank you

Duplicate of #1687


What if MediaItemTree.initialize() takes awhile?

So I found this following issue, as I believe I encountered this issue as well. So I checked the demo-session app and checked the PlaybackService and I found the following code in MediaTree.initialize()
  fun initialize(assets: AssetManager) {
   ....
    // Here, parse the json file in asset for media list.
    // We use a file in asset for demo purpose
    val jsonObject = JSONObject(loadJSONFromAsset(assets))
    val mediaList = jsonObject.getJSONArray("media")

    // create subfolder with same artist, album, etc.
    for (i in 0 until mediaList.length()) {
      addNodeToTree(mediaList.getJSONObject(i))
    }
  }

This looks fine as it establishes the tree node, MediaItem.initialize() is called on PlaybackService.onCreate(). What would you recommend to do if MediaItem.initialize() takes awhile to load? I have a data source (querying using ContentResolverCompat) of some sort which I called but this takes time to load and it uses coroutines.My entire data source hasn't been loaded yet by the time my service is destroys itself because it didn't called startForegroundService soon enough. My understanding here is that onGetLibraryRoot returns empty and in turn couldn't play anything because I am still initializing.
I don't know why Google samples are always like this, kept on loading resources from the assets folder. What if I am loading my information from some source which may take awhile (remotely, or I have to query ContentResolverCompat for the tracks I can play)? Is it possible to give me sometime to load without hitting that exception? What is the best approach here?

What would you recommend to do if MediaItem.initialize() takes awhile to load?

I'd recommend to load the media catalog asynchronously.

Is it possible to give me sometime to load without hitting that exception?

Loading the database and starting playback is not necessarily coupled by the library, if it is, it is by app logic. With the exception of the 'resume playback case by BT' (see below), an app starts the service by building a controller/browser. This way an app doesn't need to hurry with starting playback because there is no need to start foreground at all. We are happily in the bound state and starting the player can wait.
There is one case I can think of that the service needs to be started with an start-foreground-service intent and this is when playback is resumed from a BT headset. In such a case the service is started as a foreground service with an Intent, needs to prepare the player with the least recently played item and start playback swiftly. For this use case the recommended approach is to store the least recently played media item metadata in a way that can be loaded quickly.
Besides this BT case I would say starting the service by Intent is an anti-pattern or even not supported by the MediaLibraryService. There is an API for starting the service which is not base on Intent for a reason. Apps can do differently, but then they may run into problems.
In other cases separate from BT, I'd expect that the service is started by building a MediaBrowser or MediaController. In this case the browser/controller binds to the service. The service is not started with a start foreground service intent and hence there is no rush in calling start foreground I think. Your app is bound to the service and app and service is happy because we are in a bound state. You can load data as long as it requires you to do so from a content provider, a json file on disk or the internet, a local database or another method that loads data in a background thread or with coroutines/suspend in Kotlin.
The service methods like 'onGetChildren' can and need to wait. They return a Future and can wait until loading has completed. UAMP has callWhenMusicSourceReady in case you want to look at a Google sample that doesn't read from the asset folder.
If I missed a use case that can not be served with the above approach, please explain me your use case in a bit more detail and why you need to start foreground quickly in that case.

Hello thanks for the prompt response @marcbaechinger! I do understand when something takes awhile I need to load asynchronously, my question is how? The sample is using Futures but I am using Coroutines, I can't seem to connect the dots here. When loading from source, I use coroutines here is a very small snippet from my code:
class MyService : MediaLibraryService() {
    override fun onCreate() {
        ...
        // ExoPlayer setup goes here
        ...
        initializer.init() // Inside this init is a coroutine.launch{} which executes my initialization logic. In a device with 700+ tracks, 200+ groups, the best time this complete under debug mode is 10 seconds which it appear it isn't enough to keep this instance alive
    }
}

Please assume the following steps where I encounter the Foreground service exception:

Pause the player
Kill the app
Start the player from notification (e.g. in the example I mentioned, this step was triggered by Bluetooth)
The service will go alive (for like 5 seconds in my case?), it will call my Initializer which when it finishes  successfullyI have all the information I need including:

The current track that was last played
The progress of the track
The containing group the track was playing on

Then crash because I didn't call startForegroundService soon enough.

The only thing I suppose to be missing is the minimal 'metadata' information of the tracks under a group which I can read of off disk.
When I enable my breakpoints on and put one onGetLibraryRoot  this one gets hit (right before the entire service goes dead). At this point I realized my system that facilitates my contents are not yet finish initializing. I have like 5 seconds before I provide something which clearly I don't have. Its goes dead while my Initializer is initializing. The thing is I am tempted to call startForegroundService but I think this is not intended to do within MediaBrowserService or MediaSessionService.
But in your 2nd paragraph you have given the answer to this, which I believe you must put into documentation this specific case in order to prevent this problem.
What I will try would be the following, when a track has been played, I will gather all the following information (3 of which I am already doing right now, I will just add one more information):

The current track that was last played
The progress of the track
The containing group the track was playing on
[New] The tracks under that group (which would be containing the minimal metadata)

Given this case, what I will do is simply allow my initializer to fire off but along side it I will just load the metadata I store on disk and load it back, parse and build the mediaitem meta data so I can setup my Player immediately. I can bypass my initializer as this is a simple cache read.
Is this written somewhere in the official docs or is this presented in the demo-session app?

Not sure if this another important use case, though I haven't done an in-depth integration with google assistant. What if I say "Ok Google Play this  on ", and when the application is dead. Would it trigger the same behavior here because we woke the service without an accompanying UI hence the foreground exception?
Iirc, this will in turn call onGetSearchResult, which base on my example above, my initializer isn't done yet making sure my app is in nominal state.
The fact that the API returns a Future doesn't seem to help me here either and this is one crucial pain point. I can replicate that callSourceWhenReady but I am not knowledgeable how to do this in Kotlin coroutines as my application is written in Kotlin and heavily relies on this. The loading of tracks is done in coroutines and the media Media3 APIs expects a future. Its really hard to tie things together.

What if I say "Ok Google Play this trackname on My app name", and when the application is dead. Would it trigger the same behavior?

Assistant, that executes the voice command, creates a MediaBrowser that starts the service by binding to it. There is no PendingIntent involved that would make the system expect that the service is started in the foreground within a given amount of time.

What about the following approach:
1 - When the service is started you get the media URI, title and the artworkURI from local storage create a media item and set it to he player.
2 - Prepare the player with this single item. Notification and everything should work already with the basic data of a single item.
3 -  Start playback (this puts the service into foreground)
4 - Now trigger loading your database asynchronously.
5 -  When the database returns you get the other items of that category/playlist and you can add it to the player to complete the playlist. If you leave the media item that you added in 2 untouched playback is not affected by this.
With this approach you load the minimum very quickly and start playback immediately.
The user does not have a UI apart from the notification in this resume-when-app-not running case that is started from BT. So the user never sees an incomplete UI unless they are observing the notification very closely and see that suddenly the skip next button is available. But the user won't use the BT headset and observe the notification at the same time as the essence of this use case.


Make it work on mobile

It does not work on mobile

Closed via https://github.com/mhkeller/svelte-double-range-slider/commit/f6ee63fb4420189cb0db71bab164c506401522ce https://github.com/mhkeller/svelte-double-range-slider/commit/ddba4be6e6705cb69b42e21fe011d222f9557576


Found multiple accounts with the same username.

I am unable to log in to az from CLI into my ADM account and getting the below error. Please help.
Found multiple accounts with the same username.

Thank you for opening this issue, we will look into it.

duplicate with https://github.com/Azure/azure-cli/issues/20168


⚠ Bofrost.de has degraded performance

In a247f2a, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1264 ms

Resolved: Bofrost.de performance has improved in c420f9d after 9 minutes.


Intermittent PermissionDenied on commit (Windows, NTFS)

Describe the bug
After calling index_writer.commit(), I am treated with a access denied error.
IOError(IOError { path: Some("93c23b419dcd46228c0c5e8d5bccf4c4.term"), err: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } })

On one Windows machine I can reproduce this reliably with the basic_search example. On another Windows machine, it is rather infrequent and never appears with basic_search.
Which version of tantivy are you using?
0.9.1
To Reproduce
On one Windows machine, run the basic_search example.
On another, I can only reproduce it infrequently with an application I'm currently developing. Adding documents is modeled after what is in basic_search, however I'm adding millions of documents from a SQLite database and calling commit() once that is complete.

I don't have much knowledge of Windows, nor access to a windows machine. Can someone have a look at that one?
For the machine where it replicates consistently, can you confirm you have ownership of the directory you are using for the index?

@fulmicoton I can take a look at the machine where I can replicate it consistently tomorrow for you.
I can confirm that I have ownership of the directory I am using for the index. At first I left it as-is writing the index out to a temp directory, but in an effort to try and get it working I changed it to static directory that has correct ownership and write permissions.
In each case, files are written out to the directory. A snapshot from running basic_search on the consistent machine:
.managed.json
.tantivy-writer.lock
3c029a808ddb4452bd19113fcf95563c.fast
3c029a808ddb4452bd19113fcf95563c.fieldnorm
3c029a808ddb4452bd19113fcf95563c.idx
3c029a808ddb4452bd19113fcf95563c.pos
3c029a808ddb4452bd19113fcf95563c.posidx
3c029a808ddb4452bd19113fcf95563c.store
3c029a808ddb4452bd19113fcf95563c.term
4d2edfdaba5e4bf1935f4f9efba14fc6.store
meta.json

I have had only a bit of time to investigate thus far.
In directory/mmap_directory.rs I've found that meta_file.write(|f| f.write_all(data)); in the function atomic_write is failing:
Internal(
    Os {
        code: 5,
        kind: PermissionDenied,
        message: "Access is denied.",
    },
)

This is as far as I've got and wanted to report my findings thus far.

We rely on atomicwrites to perform these writes. Could you check that you can write, (and overwrite) a file with that crate in the same directory as the bug you observed?
If there is an equivalent of strace on windows, can you copy paste the log of the different syscalls?

I will look into an equivalent of strace for you.
I have managed to create a minimal application that has reproduced the error 100% of the time on the machine that only experienced it intermittently:
use atomicwrites::{AllowOverwrite, AtomicFile};
use std::io::Write;

fn main() {
    let file = AtomicFile::new("./test.bin", AllowOverwrite);
    let data = [0u8; 256];

    for val in 0..10_000 {
        file.write(|f| f.write_all(&data)).unwrap_or_else(|e| {
            println!("Failed on iteration {}", val);
            println!("{:?}", e);
            std::process::exit(1);
        })
    }
}

I did find a workaround for the reported issue. If there is an error, I retry index_writer.commit(). This solves things for now as far as I can tell, but by no means fixes the root cause :)
I will gather more data for you.

Nb: you can use Process Monitor to trace disk accesses. ETW should also work, but it's more complex to set up.
I don't know what AtomicFile does, but permission errors like these are sometimes caused when trying to delete an open file.

Closing in the meanwhile.

Just to add that I also encountered this issue on Windows when adding more than ten thousand documents:
Failed to commit index: OpenWriteError(IoError { io_error: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }, filepath: "b72a582f87db4793a18a7fafe78b7eb2.store" })

solved it with a retry (it usually meets the OpenWriterError only once). Seems like a minor, possibly platform issue. Just wanted to add another sample.

@boan-anbo  Like @lnicola I suspect an antivirus getting in the way.

Any update on this? This randomly occurs on windows when committing a lot of documents

Any antivirus running?

I am also observing the random IO failure will initializing a new index with lot of documents, commiting every 100 or so rather than 1000 exacerbate the problem. dropping the writer and recreating it workaround the problem


Upload dsyms to Datadog fails

Trying to upload dsyms to Datadog (eu) using fastlane fails with following output.
What am I doing wrong?
Looking for related GitHub issues on fastlane/fastlane...

➡  Specify IPA path as a parameter to deliver beta
    https://github.com/fastlane/fastlane/issues/244 [closed] 2 💬
    22 Sep 2016

➡  commit_version_bump error in-spite of expected and actual changes being same
    https://github.com/fastlane/fastlane/issues/248 [closed] 2 💬
    22 Sep 2016

➡  Sigh: Lane specific `team_id` and `app_identifier` not used
    https://github.com/fastlane/fastlane/issues/256 [closed] 23 💬
    22 Sep 2016

and 19128 more at: https://github.com/fastlane/fastlane/search?q=uninitialized%20constant%20Fastlane%3A%3AActions%3A%3AUploadSymbolsToDatadogAction%3A%3AFastlaneShellError%0A%0A%20%20%20%20%20%20%20%20rescue%20FastlaneShellError%20%3D%3E%20e%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%0ADid%20you%20mean%3F%20%20FastlaneCore&type=Issues&utf8=✓

🔗  You can ⌘ + double-click on links to open them directly in your browser.
/opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-plugin-datadog-0.2.0/lib/fastlane/plugin/datadog/actions/upload_symbols_to_datadog.rb:18:in `rescue in block in run': \e[31m[!] uninitialized constant Fastlane::Actions::UploadSymbolsToDatadogAction::FastlaneShellError (NameError)

        rescue FastlaneShellError => e
               ^^^^^^^^^^^^^^^^^^
Did you mean?  FastlaneCore\e[0m
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-plugin-datadog-0.2.0/lib/fastlane/plugin/datadog/actions/upload_symbols_to_datadog.rb:17:in `block in run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-plugin-datadog-0.2.0/lib/fastlane/plugin/datadog/actions/upload_symbols_to_datadog.rb:16:in `each'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-plugin-datadog-0.2.0/lib/fastlane/plugin/datadog/actions/upload_symbols_to_datadog.rb:16:in `run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
	from Fastfile:394:in `block (2 levels) in parsing_binding'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/bin/fastlane:23:in `<top (required)>'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/bin/fastlane:25:in `load'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/bin/fastlane:25:in `<main>'
/opt/homebrew/Cellar/ruby/3.1.0/lib/ruby/3.1.0/open3.rb:222:in `spawn': No such file or directory - npx (Errno::ENOENT)
	from /opt/homebrew/Cellar/ruby/3.1.0/lib/ruby/3.1.0/open3.rb:222:in `popen_run'
	from /opt/homebrew/Cellar/ruby/3.1.0/lib/ruby/3.1.0/open3.rb:210:in `popen2e'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/helper/sh_helper.rb:54:in `sh_control_output'
	from /opt/homebrew/Cellar/ruby/3.1.0/lib/ruby/3.1.0/forwardable.rb:238:in `sh'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-plugin-datadog-0.2.0/lib/fastlane/plugin/datadog/actions/upload_symbols_to_datadog.rb:32:in `upload_path'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-plugin-datadog-0.2.0/lib/fastlane/plugin/datadog/actions/upload_symbols_to_datadog.rb:17:in `block in run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-plugin-datadog-0.2.0/lib/fastlane/plugin/datadog/actions/upload_symbols_to_datadog.rb:16:in `each'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-plugin-datadog-0.2.0/lib/fastlane/plugin/datadog/actions/upload_symbols_to_datadog.rb:16:in `run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
	from Fastfile:394:in `block (2 levels) in parsing_binding'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/gems/fastlane-2.207.0/bin/fastlane:23:in `<top (required)>'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/bin/fastlane:25:in `load'
	from /opt/homebrew/Cellar/fastlane/2.204.3/libexec/bin/fastlane:25:in `<main>'

The lane used:
desc "Upload dsyms to datadog"
    lane :upload_dsym_with_download_dsyms do
        download_dsyms(app_identifier: "dk.ooono.connect", after_uploaded_date: "2022-06-21T19:00:00+01:00")
	  upload_symbols_to_datadog(
	    api_key: "HIDDEN",
	    site: 'datadoghq.eu', dry_run: true
	  )
    end

Result of env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/z9/_4p1c2n52tv2jg2sbvbz56d00000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.9s1A2Qb2aC/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=A6D1EEA9-A6C4-464C-83B4-48F277C340F9
SHELL=/bin/zsh
HOME=/Users/emilandersen
LOGNAME=emilandersen
USER=emilandersen
PATH=/var/folders/z9/_4p1c2n52tv2jg2sbvbz56d00000gn/T/frum_63247_1657266832089/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/emilandersen/.rvm/bin
SHLVL=1
PWD=/Users/emilandersen/Desktop/OOONO/iOS-OOONO
OLDPWD=/Users/emilandersen
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_REPOSITORY=/opt/homebrew
MANPATH=/opt/homebrew/share/man::
INFOPATH=/opt/homebrew/share/info:
ZSH=/Users/emilandersen/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
FRUM_MULTISHELL_PATH=/var/folders/z9/_4p1c2n52tv2jg2sbvbz56d00000gn/T/frum_63247_1657266832089
FRUM_DIR=/Users/emilandersen/.frum
FRUM_LOGLEVEL=info
FRUM_RUBY_BUILD_MIRROR=https://cache.ruby-lang.org/pub/ruby
rvm_prefix=/Users/emilandersen
rvm_path=/Users/emilandersen/.rvm
rvm_bin_path=/Users/emilandersen/.rvm/bin
rvm_version=1.29.12-next (master)
rvm_alias_expanded=
rvm_bin_flag=
rvm_docs_type=
rvm_gemstone_package_file=
rvm_gemstone_url=
rvm_niceness=
rvm_nightly_flag=
rvm_only_path_flag=
rvm_pretty_print_flag=
rvm_proxy=
rvm_quiet_flag=
rvm_ruby_bits=
rvm_ruby_file=
rvm_ruby_make=
rvm_ruby_make_install=
rvm_ruby_mode=
rvm_script_name=
rvm_sdk=
rvm_silent_flag=
rvm_use_flag=
rvm_hook=
LC_CTYPE=UTF-8
_=/usr/bin/env

Content of Pluginfile:
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-datadog'

Content of Gemfile
source "https://rubygems.org"

gem "fastlane"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

Hi @ooemil
Thank you for the report! Looks like the plugin cannot run the npx command, do you have Node.js installed on your machine?
This plugin uses datadog-ci to upload the dSYMs, it's a npm package that requires Node.js to be installed.
I don't see it explicitly mentioned in the README, so we probably should add that.
Let me know if that fixes your issue.


Add steps for enabling Insider version of Edge for WebNN Dev Preview

@fdwr @Adele101 PTAL
Fully copied from https://blogs.windows.com/windowsdeveloper/2024/08/29/directml-expands-npu-support-to-copilot-pcs-and-webnn/
@mingmingtasd @huningxin

What do you think about keeping the simple instructions for the GPU case, and relegating all this extra complexity to the NPU case (the instructions from that blog post were specifically about NPU anyway)? So there could be a new heading "Enabling Insider version of Edge for WebNN Dev Preview NPU"?

Thanks @fdwr for the fix and feedback, added GPU steps back, PTAL


[0.3.x] Make number of GWT compiler workers configurable

this is useful in CI environment where the machines have
usually less RAM

+1

Merged


Kiri sometimes does not overwrite local

When running kiri for the second time, I noticed that I don't have uncommitted changes in the browser. Kiri is also not generating any artifacts even though there are local changes.
I think it's because of this line. It makes sense to skip generating artifacts if the commit hash exists, because the hash will change if the commit is rebased, but this does not handle new local changes.

If Kiri already passed through the commit, creaking it's folder it doesn't
do anything else. It assumes everything is created.
To (re)generate everything clean, you should use the flag -r or manually
deleting that folder or deleting .kiri folder (but this is carried by -r)
On Fri, Mar 31, 2023, 06:10 Marcel Robitaille @.***>
wrote:

When running kiri for the second time, I noticed that I don't have
uncommitted changes in the browser. Kiri is also not generating any
artifacts even though there are local changes.
I think it's because of this line
https://github.com/leoheck/kiri/blob/main/bin/kiri#L1826. It makes
sense to skip generating artifacts if the commit hash exists, because the
hash will change if the commit is rebased, but this does not handle new
local changes.
—
Reply to this email directly, view it on GitHub
https://github.com/leoheck/kiri/issues/80, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJX7YDIXWBJNG5G5RLBKRTW62NP3ANCNFSM6AAAAAAWOMEX5A
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

I don't want to regenerate everything though as that would take a long time. I only want to regenerate _local_. I solved this by manually deleting .kiri/_local_ and running kiri without -r.
I think this line should be something like:
if [[ -d "${OUTPUT_DIR_PATH}/${hash_2}" -a "${hash_2}" != "_local_" ]]; then

Yeah glad you said that too. I came here to comment exactly that after
reflecting for a while.
On Fri, Mar 31, 2023, 08:49 Marcel Robitaille @.***>
wrote:

I don't want to regenerate everything though as that would take a long
time. I only want to regenerate local. I solved this by manually
deleting .kiri/local and running kiri without -r.
I think this line
https://github.com/leoheck/kiri/blob/main/bin/kiri#L1826 should be
something like:
if [[ -d "${OUTPUT_DIR_PATH}/${hash_2}" -a "${hash_2}" != "local" ]]; then
—
Reply to this email directly, view it on GitHub
https://github.com/leoheck/kiri/issues/80#issuecomment-1491808357, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJX7YDYFQ3LHP67ZSAXZKTW63AETANCNFSM6AAAAAAWOMEX5A
.
You are receiving this because you commented.Message ID:
@.***>

Would you accept such a pull request?

Sure, please, go ahead.

Ok, it is more involved than I thought. With the change I proposed above, kiri is regenerating a lot of existing artifacts. I do not really understand why.
I see that in generate_diffs there is a nested for loop. Could you please help me understand why? I thought we would only need to iterate through every commit once and generate its artifacts. I know the frontend loads the svg for 2 commits separately and does the diff on the frontend. What is the need for these two loops. I think this is what's causing a lot of work to be redone with the change I proposed.

I will have to investigate later. But it is indeed an interesting proposal since it allows the constant work and check.
Now, you could test and use this which may mimic the intended behavior:
rm -rf .kiri/_local_/ && Kiri -V

This would work as you are expecting, I think. If this doesn't work, then kiri has a fundamental behavior that doesn't allow that in the first place. Then we should investigate this deeply.
Also, another approach, would be this:
kiri -r -t 2
|```

which will delete the folder but it will build the last 2 commits only

@MarcelRobitaille I think I could put this to work. Can you check if the local-rev branch works for you?
I already made a PR https://github.com/leoheck/kiri/pull/81

Hey, I thought it was good, then I pushed it to the master, you can test it from there, now.

Yeah that's one way to do it too. I think it would work; that's how I solved it manually. I will check it out. Thanks!


2.x Document post serialization

Ticket: #2311
Issue
As one of the final documentation issues in #2073, we should document JSON serialization of posts that was added in #2311.
Solution
Take a stab at adding an example with a book post.
Impact
Even more insights about posts and advanced Timber coding.
Usage Changes
None.
Considerations
@acobster I hope I got everything right!
Also, in https://github.com/timber/timber/pull/2311#issuecomment-677820224 you had an idea to implement jsonSerialize() in Timber\Post.

Yeah, in addition to providing some sensible default behavior in Timber\Post (I just wanted to avoid touching Post too much in this PR, and just focus on collections). Child implementations can easily call parent::jsonSerialize() to get the data to use as a basis, so we should capture that in the docs.

Right, good idea! We should definitely also have an example that explains that removing data would make sense, too, because you don’t want to fill the HTML of a page with data that has to be downloaded but that you will never need.

I’m still not sure about that, but I think it might be hard to figure out which data is added by default, because this depends sooo much on the use case. Maybe not defining a default isn’t all that bad after all?
Testing
Nope.

@jarednova Thanks for checking! I think it’s totally fine to fix typos and grammatical issues directly. But suggestions work great as well 👍. I’ll leave it to you to merge this in.

👍


TextField clear

I need something like if user clicks outside this searchfield whilt tyoing something then if he has not selected anything from dropdown then textfield should be clear

@jaydeepkaria-mi On package side I cannot determine if suggestion is selected or not in the scenario when controller was passed by you and initial value also been passed. You can wrap the package with TapRegion widget and onTapOutside you can clear the field.
TapRegion(
   onTapOutside: (event) {
        controller.clear();
   },
   child: DropDownSearchFormField( ...... )
)

Closing this ticket for now.


[C-Api] fix mem leak case

Code clean, fix mem leak case.

Origin: https://github.com/nnstreamer/api/commit/41bedd28b7576306af1c69817e35fe462de61705

Referring to the above commit, _training_offloading_send_trained_model() function part is removed. Please check the code whether the change is necessary or not.


failed to add the AeroGear android sdk modules as dependencies to android projects by following the instructions

Expected Behavior
I followed the instructions in the getting-started guide to try adding the AG modules to another android project.
I did installed the AG sdk modules locally first.
I would expect gradle will be able to find the dependencies and build the android app after following the instructions
Actual Behavior
Gradle complains it can not find the module I specified. A few problems:

the group name is wrong. It looks like it should be org.aerogear
even after fixing the group id, gradle still can't find the module. I think it is because "org.jboss.aerogear:aerogear-android-sdk-bom" is using the wrong version number.

I managed to get it working by specify the full group id, artifact id and version number like this: https://github.com/feedhenry/mobile-security-android-template/blob/ce9a3fd29c52ea36009011bff78bde6b54146525/app/build.gradle#L53-L54
Steps to Reproduce the Problem

Follow the getting started instructions to setup the another android project.

I'll take care of this @wei-lee

https://github.com/aerogear/aerogear-android-sdk/pull/52

@wei-lee Can I close it?


Using Roboto Condensed & subset latin-ext (see Issue #1100)

Hello,
Sorry about the duplicate, you cannot reopen a closed issue.
As I said in issue #1100, I have the same problem with the font and french accented characters.
I'm on a raspberry Pi with latest Raspbian.
Workaround in custom.css doesn't work for me.
What can I do to help solve the issue ?

I Reopened #1100


Video keeps playing in pages

I have HTML5 video in one of the pages with autoplay enabled. That video keeps playing from beginning when I browse other pages after visiting the page with the video.
To reproduce the issue, just add this code in one of the .erb file:
<video controls autoplay>
    <source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
    Your browser does not support the video tag.
</video>

Then navigate to that page and then to other pages. Tested in Chrome, Firefox and Safari in Mac.

hi all, i meet this issue too. Any update for this?

It's funny this bug :smile:

:D i just paused video

This is sort of less a bug than fundamentally how TL5 works by design.
Unlike TL3's "partial replacement", TL5 removes all elements in the body from the DOM, no matter what. If an element has a data-turbolinks-permanent attribute, it is still removed from the old page's body and moved into the new one, which is what's causing the behavior you're seeing.
Unfortunately, I think probably the only way this will be fixed is with some kind of dom-diffing plugin so that elements which persist between pages are not removed and re-inserted.

A solution mentioned in #157 which may work here is to create an HTMLVideoElement without an associated tag.

Any idea how to actually solve this?

Here's how I managed it.
document.addEventListener("turbolinks:request-end", function() {
  if ($('video').length > 0) {
    $('video').remove()
  }
});

I'm also encountering this issue.
The only workaround I've found is to opt out of Turbolinks cache completely.
<meta name="turbolinks-cache-control" content="no-cache">

Wrestled with this for a couple days. I tried a bunch of different solutions including those mentioned above. The only solution that I got to work was based of one of the solutions from #157.
Remove the autoplay attribute and add an id to your video tag
<video id="video_node" controls>
    <source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
    Your browser does not support the video tag.
</video>

Then add the following javascript to your page
var playVideoHandler = function(event) {
  var videoElement = document.getElementById("video_node");
  videoElement.play();
  document.removeEventListener("turbolinks:load", playVideoHandler);
};
document.addEventListener("turbolinks:load", playVideoHandler);

or jQuery
$(document).one("turbolinks:load", function(event) {
  var videoElement = document.getElementById("video_node");
  videoElement.play();
});

The only weird thing I've noticed is that on subsequent requests to the video page the event handler is called twice. Still need to investigate this but the desired behavior is achieved. Kinda of hacky but better than completely disabling turbolinks.

This is what I am using to get around the issue.
<script>
  $(document).one("turbolinks:before-cache", function(event) {
    $("video[id=content_player_video]").remove();
  });
  $(document).one("turbolinks:load", function(event) {
    if( $("#content_player_video").length == 0 ) {
      $("#content_player_div").append(
        $("<video controls autoplay/>")
          .attr("id", "content_player_video")
          .attr("oncontextmenu", "return false;")
          .attr("controlList", "nodownload")
          .append($("<source/>")
            .attr("src", "<%= source_url %>")
            .attr("type", "video/mp4")
        )
      )
    }
  });
</script>

As has been hinted at, this is due to Turbolinks caching. Even though the auto-video is not visible, it is stored in the cache, and therefore will still play automatically.
I think Turbolinks could handle this by default, but in the meantime, and as an alternative to disabling the cache, or re-constructing the video element manually, you may find the following script useful. Similar to Persisting Elements Across Page Loads, this solution requires that autoplay elements have a unique ID…
;(function () {
  var each = Array.prototype.forEach
  var autoplayIds = []

  document.addEventListener('turbolinks:before-cache', function () {
    var autoplayElements = document.querySelectorAll('[autoplay]')
    each.call(autoplayElements, function (element) {
      if (!element.id) throw 'autoplay elements need an ID attribute'
      autoplayIds.push(element.id)
      element.removeAttribute('autoplay')
    })
  })

  document.addEventListener('turbolinks:before-render', function (event) {
    autoplayIds = autoplayIds.reduce(function (ids, id) {
      var autoplay = event.data.newBody.querySelector('#' + id)
      if (autoplay) autoplay.setAttribute('autoplay', true)
      else ids.push(id)
    }, [])
  })
})()

This script gets all the autoplay elements before the page is cached, stores each ID in autoplayIds, then removes the autoplay attribute. When a page is about to be rendered, it iterates over the stored IDs, and checks if the new body contains an element with a matching ID. If it does, then it re-adds the autoplay attribute, otherwise it pushes the ID to the new autoplayIds array. This ensures that autoplayIds only includes IDs that have not been re-rendered.
(This solution was also posted on my StackOverflow answer.)
Hope that helps.

Tried your solution @domchristie , however i'm getting errors. My set up is two different videos each on different pages. Copied and pasted your code. Each video has a unique id.
Uncaught TypeError: Cannot read property 'push' of undefined
Could be a problem with your reducer... haven't had a chance to play. Tested on latest Chrome and Safari... same problem.

@jaybloke Thanks for testing this out. I noticed that the reducer wasn't returning anything. The script above has now been fixed. Thanks again

Works like a charm @domchristie !


Fix: #2596 Failing compilation when embedded structs are of type Pointers/MaybePointers

Failing compilation when embedded structs are of type Pointers/MaybePointers
Before Fix:
Embedded structs of type Pointers/MaybePointers resulted in assert failures
After Fix:
Embedded structs of type Pointers/MaybePointers results in compilation failures
Tests and Build Passed Successfully.
[Ticket: #2596 ]

Thanks for the contribution!
Would you be so kind and include the code example from #2596 as a test in badpony.cc and assert that the correct compiler error is raised? This way we can ensure that we don't hit this assertion again. You can use the patterns from the other tests in that file. If you need help, feel free to ask here.

sure thing 🙂

Added test to fail compilation when embedded structs are of type Pointers/MaybePointers
From the code, I was hoping that the error message would be
"embedded fields must be classes or structs"
However, I see that from the test case I get the error message:
"syntax error: unexpected token Whoops after type, interface, trait, primitive, class or actor definition"
I tried to trace through the program
And i guess the error comes from src/libponyc/ast/parser.c:1233
But I couldn't reason it.
Thoughts?

@aravind-kumar can you fix the merge conflict with badpony.cc ?

@aravind-kumar Could you change the expected error message as pointed out by @mfelsche before we merge? Thanks.

Closing as #3006 was merged. Thanks for taking this on.